Skip to content

Conversation

@karthage-spartacus
Copy link

@karthage-spartacus karthage-spartacus 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.

@karthage-spartacus karthage-spartacus 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.

4 participants