Skip to main content

$$at

Retrieves an element from a specific position inside an input array

Usage​

{ 
"$$at": /* Array to fetch from */,
"index": /* integer */
}
"$$at(<index>):{input}"

Returns​

Same as value at specified index

Arguments​

ArgumentTypeValuesRequired / Default ValueDescription
PrimaryarrayYesArray to fetch from
indexintegerYesThe index of element to return, negative indices will return element from the end (-n -&gt; length - n)

Examples​

Input

Definition

Output

[
4,
2,
13
]
"$$at(0):$"
4
[
4,
2,
13
]
"$$at(1):$"
2
[
4,
2,
13
]
"$$at(-1):$"
13
[
4,
2,
13
]
"$$at(3):$"
null
[
4,
2,
13
]
"$$at:$"
null
[
4,
2,
13
]
{
"$$at": "$",
"index": 0
}
4
[
4,
2,
13
]
{
"$$at": "$",
"index": 1
}
2
[
4,
2,
13
]
{
"$$at": "$",
"index": -1
}
13
[
4,
2,
13
]
{
"$$at": "$",
"index": 3
}
null
[
4,
2,
13
]
{
"$$at": "$"
}
null