We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Since jpterm is a tool for humans, please add an option to sort the keys.
The text was updated successfully, but these errors were encountered:
@hawkeyej could you provide an example of what you mean? jpterm supports the sort() function.
Sorry, something went wrong.
I think he means the equivalent of jq's -S:
Output the fields of each object with the keys in sorted order.
E.g. echo '[{"b":2, "a":3}]' | jp.py -S '[0]' Would generate: { "a": 3, "b": 2 }
echo '[{"b":2, "a":3}]' | jp.py -S '[0]'
{ "a": 3, "b": 2 }
Alternatively, is there a way to do this with existing tools? E.g. [0].{sort(keys([0]))}
[0].{sort(keys([0]))}
This would be useful for running unix diff on the output of two different jmespath invocations.
No branches or pull requests
Since jpterm is a tool for humans, please add an option to sort the keys.
The text was updated successfully, but these errors were encountered: