> ## Documentation Index
> Fetch the complete documentation index at: https://docs.metrics-man.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Keys

# \$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

```json theme={null}
{
  "$keys": [
    {
      "name": "Alice",
      "age": 25,
      "city": "New York"
    }
  ]
}
```

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

### From Field

```json theme={null}
{
  "$keys": [
    {
      "$input": "user_object"
    }
  ]
}
```

Result: An array of all keys from the user\_object field
