Skip to main content

$nth

The $nth operator returns the element at the specified index in an array.

Input

  • An array containing an array value and an integer index

Output

  • The element at the specified index in the array, or null if the index is out of bounds

Examples

Get Element at Index

Result: 3 (element at index 2, 0-indexed)

From Field

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