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 sort and filter expressions to CommonExpressionsPlugin #318

Open
hborawski opened this issue Mar 8, 2024 · 0 comments
Open

Add sort and filter expressions to CommonExpressionsPlugin #318

hborawski opened this issue Mar 8, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@hborawski
Copy link
Contributor

Is your feature request related to a problem? Please describe.

When working with templates, and assets that can have multi-node children, developers should be able to sort or filter the data being used to produce those collections easily

Describe the solution you'd like

Add expressions to CommonExpressionsPlugin to filter and sort arrays in data.

The sort expression should use an expression to determine the sort order, providing implicit objects to the expression to represent the two elements being compared

example

{{data}} = sort({{rawData}}, 'L["count"] < R["count"]')'

The filter expression should use an expression to determine if the element should be included, providing an implicit object to the expression to represent the element.

example:

{{data}} = filter({{rawData}}, 'E["status"] == "incomplete"')

Additional context

@hborawski hborawski added the enhancement New feature or request label Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant