Closed nanthony007 closed 2 years ago
This would add a lot of complexity and so will be closed for now with preference of using this sexy one-liner taken from the inter webs:
Requires jq
link
jq --slurp -r '(map(keys) | add | unique) as $cols | map(. as $row | $cols | map($row[.])) as $rows | $cols, $rows[] | @csv'
This can be put into a bash script for automation and file conversion.
It would be great to accept JSON data to the CLI app that way it can be utilized as a step in a pipeline directly as opposed to needing the additional step of CSV preprocessing.