Array at
Description
Pure function returning the element at the given index in an array. Generic on the element type; type is fixed at design-time when connected. Out-of-range indices fail the pipeline; a null array counts as empty, so every index is out of range.
When to use
Use Array at to pluck a single element from an array by position — for example, extracting the first result from an API response that returns an array. Because it is a pure generic node it works with any array type. If the index might be out of bounds, use Array length and a Branch to validate before calling Array at. The same guard covers a null array, since Array length reads it as 0.
Pins
Input pins
| Pin | Type | Default | Notes |
|---|---|---|---|
| Array | generic[] | — | The array to index into. The element type resolves at design-time from the connected source. A null array — for example an optional array field that arrived as JSON null — counts as empty, so any index is out of range. |
| Index | integer | 0 | Zero-based index of the element to retrieve. Out-of-range values fail the pipeline. |
Output pins
| Pin | Type | Notes |
|---|---|---|
| Element | generic | The element at the specified index. Type matches the array's element type. |
Example
Log only the first item from a split string array. Wire the Result output of Split into
the Array input of Array at and leave the Index input at its default 0. The Element
output is the string "apple", ready to wire into the Message input of Log message.