ELEMENT_AT_KEY
All functions > ARRAY OF ROWS > ELEMENT_AT_KEY
Returns one element at the given key from the given index, array or array of rows.
Signatures
Returns: Single element at the position indicated by index[key]
ELEMENT_AT_KEY(index: INDEX, key: T, base: ARRAY<ROW<T>>) → ROW<T> sql
| Parameter | Type | Required | Description |
|---|---|---|---|
index | INDEX | Yes | Index to look up position from |
key | T | Yes | Key to look up in the index |
base | ARRAY<ROW<T>> | Yes | Array or array of rows to extract element from |
Notes
- Uses index to map key to array position
- Looks up key in index to find position
- Returns element at that position from base array
- Returns NULL if key not found in index
- Useful for efficient lookups with pre-computed indexes
On this page