Booleans
boolean applies JSONata truthiness (empty strings, 0, empty arrays/objects are false); not negates it; exists is true for any value that isn't undefined (including null).
boolean
boolean(value: unknown): booleanJSONata truthiness: "", 0, [] and {} are false.
typeflow
hasBio: boolean(user.bio)not
not(value: unknown): booleanNegated JSONata truthiness.
typeflow
isBlank: not(user.bio)exists
exists(value: unknown): booleanTrue unless the value is undefined (null exists).
typeflow
wasDeleted: exists(user.deletedAt)Playground
{ "hasBio": false, "hasTags": true, "isBlank": true, "wasDeleted": true }
inferred type
{
hasBio: boolean;
hasTags: boolean;
isBlank: boolean;
wasDeleted: boolean;
}