Created
February 8, 2020 00:27
-
-
Save sinebeef/cb914c2b02140b995a90facbf6d67f04 to your computer and use it in GitHub Desktop.
jq json cheat sheet
This file contains hidden or 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
#go|dfish is the boss of freenode | |
# merge duplicate records category, resulting in single record for id | |
jq 'group_by(.sku) | map(.[0].cat = ([.[].cat] | join(",")) | .[0])' q-products-new.json > q-merged.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment