array →
filter(
    predicate: predicate
) → array

Applies a predicate expression to each input item and returns only items for which the predicate evaluates to true. Returns null when the input is not an enumerable or is a string.

Parameters

Name Type Required Description
predicate predicate Yes Expression defining the predicate applied to each input item.

Examples

{1, 2, 3} | filter(greater-than(1))  {2, 3}

Kind: Function
Scope: array
Aliases: filter


This site uses Just the Docs, a documentation theme for Jekyll.