Skip to main content
Log inSign up

Shopify uses cookies to provide necessary site functionality and improve your experience. By using our website, you agree to our privacy policy and our cookie policy.

Liquid arrays now support the find, find_index, has, and reject filters

We’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
  • find_index: Returns the index of the item that matches your condition
  • has: Returns true when the array includes an item that matches your condition
  • reject: 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?