key
any →
key(
...expressions: expression
) → pair
Associates the input value with a key calculated by one or more expressions.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
expressions | expression | Variadic (one or more) | One or more expressions evaluated against the input; multiple results form a tuple key. |
Argument evaluation
expressions: Each supplied expression is evaluated once against the value entering this call.
Examples
"Belgium" | key(@_) → ("Belgium" => "Belgium")
"Alice" | key(upper, lower) → (T("ALICE", "alice") => "Alice")
Kind: Function
Scope: array/grouping
Aliases: None