Last active
August 29, 2015 14:22
-
-
Save bawbgale/2bb60bec9154e6b49d8e to your computer and use it in GitHub Desktop.
Convert a set of flat JSON objects with consistent key order to CSV
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
cat part-00000 | jq -s -r '.[0] | to_entries | map(.key) | @csv' > all.csv | cat part-* | jq -s -r '.[] | to_entries | map(.value) | @csv' >> all.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment