Created
September 28, 2020 15:15
-
-
Save 0xKD/5007d980c3337fa937489453a028e8c4 to your computer and use it in GitHub Desktop.
json-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
alias json2csv="python -c 'import json;b=json.loads(input());[print(f\"{k},{v}\") for k,v in b.items()]'" | |
# use it like this | |
cat file.json | json2csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment