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

Sorting arrays #39

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Sorting arrays #39

wants to merge 10 commits into from

Conversation

nathanschwarz
Copy link

@nathanschwarz nathanschwarz commented Jun 27, 2020

Added the possibility to sort arrays with the --key option.

I added new tests under tests/overwrite.js

The option uses a MongoDB like string formating for the key $ for arrays and . for properities.

It enables to sort arrays in ascending or descending order (even nested in objects or arrays).

You can sort plain arrays or arrays of object by a specific properity.

@nathanschwarz nathanschwarz mentioned this pull request Jun 27, 2020
@kingthorin
Copy link

Cool

@kingthorin
Copy link

@kesla any chance this will be merged soon? It's already a second take of an earlier contribution and now has a bunch of conflicts again.

@ssbarnea
Copy link

ssbarnea commented Apr 2, 2022

@kesla @kingthorin has a very good question, one that makes me wonder if #12 was close with valid resolution.

@rrettweiler
Copy link

@kesla, this is exactly the feature I was missing, works well for me, any reasons why this is not merged?

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.

None yet

4 participants