Skip to content

Instantly share code, notes, and snippets.

@0xKD
Created September 28, 2020 15:15
Show Gist options
  • Save 0xKD/5007d980c3337fa937489453a028e8c4 to your computer and use it in GitHub Desktop.
Save 0xKD/5007d980c3337fa937489453a028e8c4 to your computer and use it in GitHub Desktop.
json-to-csv
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