Created
August 1, 2023 20:22
-
-
Save m0smith/d11a72181f47f303986133ecb5c706f0 to your computer and use it in GitHub Desktop.
Converting JSON to CSV with headers
This file contains 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
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