ContainsField
ContainsField( field, in )
ContainsField( field, in )
ContainsField( field, in )
ContainsField( field, in )
contains_field( field, in )
ContainsField( field, in )
Description
The ContainsField
function returns true
if the specified field
exists
within the result of the in
expression, or false
otherwise.
ContainsField
is useful when you need to distinguish between objects,
arrays, or documents that contain a field and those that do not.
Examples
The following query returns true
because the field a
exists
in the provided object:
BooleanV(True)
true
true
true
True
true
The following query returns false
because the field f
does not exist
in the provided object:
BooleanV(False)
false
false
false
False
false
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!