Skip to main content
AT_INDEX
Tom Williams avatar
Written by Tom Williams
Updated over a year ago

Function: AT_INDEX

Syntax: AT_INDEX(list, index) or list[index]

Description: Returns the list element at the specified index. The index starts at zero and goes up to LENGTH(array) - 1. A negative index can be specified to access elements from the end of the list.`

Sample usage:

  • AT_INDEX(["a", "b", "c"], 0) returns "a"

  • AT_INDEX(["a", "b", "c"], 1) returns "b"

  • AT_INDEX(["a", "b", "c"], 2) returns "b"

  • AT_INDEX(["a", "b", "c"], 3) returns null

  • AT_INDEX(["a", "b", "c"], -1) returns "c"

  • AT_INDEX(["a", "b", "c"], -2) returns "b"

Did this answer your question?