position-of
array →
position-of(
value: any
) → integer
Returns the zero-based position of the first input item equal to the specified value. Returns null when no item matches or the input cannot be evaluated.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
value | any | Yes | Specifies the value to locate. |
Argument evaluation
value: Evaluated once in the enclosing context.
Examples
{"a", "b", "c"} | position-of("b") → 1
Kind: Function
Scope: array/sequencing
Aliases: position-of