Skip to main content

$hasKey

The $hasKey operator checks if an object contains a specific key.

Input

  • An array containing an object/map and a string key name

Output

  • true if the object contains the specified key, false otherwise

Examples

Check If Object Has Key

Result: true

Check If Object Does Not Have Key

Result: false

From Field

Result: true if the user_object field contains an “email” key, otherwise false