where

Keep array items whose property exactly matches a value.

View Markdown

Syntax

{{ value | where:("published", true) }}{{ value | where:("status", "draft") }}{{ value | where:("author.name", "Ada") }}

Usage

  • A quoted property path and comparison value are required. Dotted paths select nested own properties.
  • Strings, numbers, booleans, and null are compared by type and value.
  • Missing properties never match, including when the comparison value is null.
  • Matching items retain their types and original order.

Examples