3 ms·
jq (https://stedolan.github.io/jq/ https://stedolan.github.io/jq/) is a great tool for general JSON manipulation. It includes a CSV export filter, so you can ru
by matthewmacleod 11y ago
jq (https://stedolan.github.io/jq/ https://stedolan.github.io/jq/) is a great tool for general JSON manipulation. It includes a CSV export filter, so you can run commands like:
jq -r '. | map(.key), map(.value) | @csv'
which will output a JSON array as CSV.
- kawera 11y agoVery elegant solution, thank you. jq is indeed a powerful tool but it can get hairy with obnoxiously intricate json files/streams.