Reference material for ARRAY_FILTER function
<array>
for which the given Lambda function <function>
returns something other than 0
.
The function can receive one or more arrays as its arguments. If more than one array is provided the following conditions should be met:
1
) for this index to be included in the results. The elements that are returned are taken only from the first array provided.
Parameter | Description | Supported input types |
---|---|---|
<function> | A Lambda function used to check elements in the array. | Any Lambda function |
<array> [, ...] | One or more arrays that will be evaluated by the Lambda function. Only the first array that is included will be filtered in the results. All the arrays must have exactly same number of elements. | Arrays that each contain the same amount of elements |
ARRAY
of the same type as the first input array
['a']
In this example below, there are two arrays and two separate arguments for evaluation. The Lambda function searches the second array for all elements that are greater than 2. The elements in these positions are returned from the first array. The returned elements highlight the players who have completed above level 2.
['kennethpark', 'rileyjon']
In this example below, there are three arrays, and Lambda function which meet the condition on two of them.
['Player C']