Skip to content

#exists

Returns true if the provided value is not null, false otherwise.

#exists(value)
Category Paths and existenceValid in Property value
Name Type Description
value path | value The value to test.

boolean

source.json
{
"a": null,
"b": 1
}
transformer.json
{
"aExists": "#exists($.a)",
"bExists": "#exists($.b)",
"cExists": "#exists($.c)"
}
output.json
{
"aExists": true,
"bExists": true,
"cExists": false
}

Try it in the playground →

#isNull · #isMissing