Skip to content

Instantly share code, notes, and snippets.

@rorymalcolm
Created May 1, 2023 08:29
Show Gist options
  • Save rorymalcolm/258159763763da0505e25e45583cb0b8 to your computer and use it in GitHub Desktop.
Save rorymalcolm/258159763763da0505e25e45583cb0b8 to your computer and use it in GitHub Desktop.
jq -r '(map(keys) | add | unique) as $cols | map(. as $row | $cols | map($row[.])) as $rows | $cols, $rows[] | @csv' output.json >> output.csv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment