Skip to content

where

Filters list elements based on a predicate.

where(xs:list, capture:field, predicate:bool) -> list

The where function keeps only elements of a list for which a predicate evaluates to true.

A list of values.

The name of each list element in each predicate.

The predicate evaluated for each list element.

from {
xs: [1, 2, 3, 4, 5]
}
xs = xs.where(x, x > 3)
{xs: [4, 5]}

map