Skip to main content

$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

Result: 1

From Field

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