Themes
Liquid arrays now support the find
, find_index
, has
, and reject
filters
find
, find_index
, has
, and reject
filtersWe’ve introduced the following new filters to improve how you handle arrays in your Liquid templates. Now, you can quickly retrieve or check for items in an array without writing verbose loops or complex conditional logic.
find
: Returns the first item that matches your condition: Returns the index of the item that matches your condition
has
: Returnstrue
when the array includes an item that matches your conditionreject
: Returns an array without items matching your condition
These filters make your Liquid code more concise and declarative.
To learn more, check out the Liquid arrays API docs. Happy coding!
Was this section helpful?