Created
April 30, 2025 20:00
-
-
Save ashtonmeuser/cdf71fa0e5f7f201c33a5933c344b661 to your computer and use it in GitHub Desktop.
Convert a JSON array of objects to CSV
This file contains hidden or 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
jq -r '(.[0] | keys_unsorted) as $keys | $keys, map([.[ $keys[] ]])[] | @csv' input.json > output.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment