Skip to main content

$last

The $last operator returns the last element of an array.

Input

  • A single array value

Output

  • The last element of the array, or null if the array is empty

Examples

Get Last Element

Result: 5

From Field

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