Skip to content

Instantly share code, notes, and snippets.

@m0smith
Created August 1, 2023 20:22
Show Gist options
  • Save m0smith/d11a72181f47f303986133ecb5c706f0 to your computer and use it in GitHub Desktop.
Save m0smith/d11a72181f47f303986133ecb5c706f0 to your computer and use it in GitHub Desktop.
Converting JSON to CSV with headers
cat data.json | jq -r '["Name", "Email"], (.[] | [.name, .email]) | @csv'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment