Skip to content

Instantly share code, notes, and snippets.

@palashkulsh
Last active July 30, 2022 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save palashkulsh/a85b236d69e77be7b8a64465372dc302 to your computer and use it in GitHub Desktop.
Save palashkulsh/a85b236d69e77be7b8a64465372dc302 to your computer and use it in GitHub Desktop.
jq new usages
[{pincode:1,value:1},{pincode:2,value:2}]
to
{1:{pincode:1,value:1},2:{pincode:2,value:2}}
jq '.| map({(.pincode|tostring): .}) | add' IN.json > pincode_wise.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment