Skip to main content

where

Creates a new array containing only the objects that have a specific property value.

Basic Usage

This example selects all products from collection.products where the available property is true.

{% set available_products = collection.products | where("available", true) %}

{% for product in available_products %}
- {{ product.title }}
{% endfor %}