Reference material for ARRAY_FIRST function
Returns the first element in the given array for which the given function returns true
. The <function>
parameter must be included.
Parameter | Description | Supported input types |
---|---|---|
<function> | A Lambda function used to check elements in the array | A Lambda function returning BOOLEAN |
<array> | The array evaluated by the function | Any array |
The element type of <array>
The following example returns the first value in the levels
array greater than 2:
Returns: 4