Skip to content
Legacy docs for Tenzir v5.x. For the latest Tenzir v6 series, visit docs.tenzir.com. Migrating from v5? Read the Tenzir v6 migration guide.

Filters list elements based on a predicate.

where(xs:list, any->bool) -> list

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

A list of values.

A lambda function that is evaluated for each list element.

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

Last updated: