Skip to main content

$keys

The $keys operator returns an array of all keys in an object/map.

Input

  • A single object/map value

Output

  • An array containing all the keys of the input object

Examples

Get Keys from Object

Result: ["name", "age", "city"]

From Field

Result: An array of all keys from the user_object field