> ## 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.

# First

# \$first

The `$first` operator returns the first element of an array.

## Input

* A single array value

## Output

* The first element of the array, or null if the array is empty

## Examples

### Get First Element

```json theme={null}
{
  "$first": [
    [1, 2, 3, 4, 5]
  ]
}
```

Result: `1`

### From Field

```json theme={null}
{
  "$first": [
    {
      "$input": "items"
    }
  ]
}
```

Result: The first element of the items field array, or null if the array is empty
