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

Sort By Key #13

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

Sort By Key #13

wants to merge 5 commits into from

Conversation

nathanschwarz
Copy link

Added the possibility to choose a key for sorting with the flag "-k [key]" or "--key [key]"

@kesla
Copy link
Owner

kesla commented Sep 7, 2017

Hey!

Thanks for the pull request.

I have to admit that I'm having troubles understanding exactly what this PR does... Could you perhaps post some example input/out when using the "key"option? Or perhaps even better, add some tests :)

@kesla
Copy link
Owner

kesla commented Sep 7, 2017

Also, if you could rebase on latest master so we can get travis working in this PR that'll be great!

@nathanschwarz
Copy link
Author

Hi ! well It wasn't very clear indeed...
This PR enables you to choose the key to sort a JSON array. I had an issue with a JSON array which had multiple keys (id int, title string, etc.) and when I used sort-JSON on it, it was sorted by title but I wanted it sorted by id. So I made it up :) . I'll rebase the PR and i'll add some tests in a few days :)

@kingthorin
Copy link

Is this still coming? It's be nice to see, I have a use case where it'd be helpful.

@nathanschwarz
Copy link
Author

@kingthorin I'll try to push a new PR this weekend if I have the time :)

@hinabintehaq
Copy link

Would be great if you can do it this weekend! i require the same functionality for something im working on!

@kingthorin
Copy link

Any news?

@kingthorin
Copy link

Ping 😊

@nathanschwarz
Copy link
Author

@kingthorin sorry for the late feedback, I just made a new PR here: #39

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