Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add find, find_index, has, and reject filters to arrays #1869

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

karreiro
Copy link
Contributor

@karreiro karreiro commented Dec 12, 2024

This PR implements the RFC#1864 and introduces support for the find, find_index, has, and reject filters into the Liquid Array API.

The new filters support multi-level access to drops, so they can access properties like this:

{% assign product = products | find: 'price.unit', 'BRL' %}

For the sake of consistency, multi-level access has been introduced for all related filters in the Array API: map, sort, sort_natural, sum, uniq, where, and compact.

--

Special thanks to @andershagbard who started this work on #1573 and #1749. I'm including those commits as part of this PR; while the implementation approach is slightly different, important work happened there, and it's valuable to have that context in the Liquid commit history.

Also, thank you to everyone who contributed with thoughts and suggestions in the RFC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants