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
Please describe your feature request. Ability to sort keys ignoring case (not case sensitive).
Describe the solution you'd like If we have data1.yml like:
Foo: 3 apple: 1 bar: 2
And we run a command:
yq -P 'sort_keys_insensitive(..)' data1.yml
it could output
apple: 1 bar: 2 Foo: 3
Describe alternatives you've considered I tried to use 'sort_keys(..|downcase)' but it does not work (probably as expected).
'sort_keys(..|downcase)'
Additional context While I don't want to consider case for the purpose of the sort, I would like to retain the case of the keys in the output.
The text was updated successfully, but these errors were encountered:
Will accept a PR for this, this should be done by adding a sort_keys_by function (just as there is a sort_by function here)
sort_keys_by
sort_by
You will then be able to: sort_keys_by(downcase)
sort_keys_by(downcase)
Sorry, something went wrong.
Otherwise I may get to it in a few weeks :)
No branches or pull requests
Please describe your feature request.
Ability to sort keys ignoring case (not case sensitive).
Describe the solution you'd like
If we have data1.yml like:
And we run a command:
yq -P 'sort_keys_insensitive(..)' data1.yml
it could output
Describe alternatives you've considered
I tried to use
'sort_keys(..|downcase)'
but it does not work (probably as expected).Additional context
While I don't want to consider case for the purpose of the sort, I would like to retain the case of the keys in the output.
The text was updated successfully, but these errors were encountered: