Skip to content

Bars Specification 0.1.0 — Transform: reject

Category: list · Since: 0.1.0

Filters out elements matching a predicate.

The inverse of where — returns elements (structs) that do not match the predicate: with value, elements whose property does not string-equal value; with no value, elements whose property is not truthy.

Input coercion: list

Arguments

Name Type Optional Default
property string no
value string yes

Arity: 1–2

Worked examples

{{ items | reject: "k" "a" }}

[{"k":"b"}]
{{ items | reject: "on" }}

[{"on":false}]

Full fixture: transforms/transform-reject.json