This function retrieves an element from an array using the specified index.
Syntax
array-get(array, index=number)
Parameters
array
: The input array.index
: The index of the element to retrieve. This is a mandatory parameter.
Examples
array-get([1, 2, 3, 4], index=2)
returns 3
array-get(["apple", "banana", "cherry"], index=1)
returns "banana"
Note
The index is 0-based, which means if you want to get the second element you must use index=1.