Skip to content

Reject ​

Last updated View as Markdown

You get the items of an array without a matching property. The match is the same as for where.

liquid
{{ array | reject: property, value }}

Example ​

Data
json
{
  "products": [
    { "title": "Hat", "available": true, "type": "Accessory" },
    { "title": "Tee", "available": false, "type": "Clothing" },
    { "title": "Cap", "available": true, "type": "Accessory" }
  ]
}
liquid
{{ products | reject: 'available' | map: 'title' | join: ', ' }}

Output

html
Tee