$$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​
Argument | Type | Values | Required / Default Value | Description |
---|---|---|---|---|
Primary | array | Yes | Array to fetch from | |
index | integer | Yes | The index of element to return, negative indices will return element from the end (-n -> 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