Last active
March 29, 2022 22:41
-
-
Save flavono123/f71903270ab6b3d9bb823ebddac702f0 to your computer and use it in GitHub Desktop.
Sort JSON by jq filters, like the option `--sort-keys`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jq 'walk(if type=="object" then to_entries | sort_by(.key) | from_entries else . end)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment