Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #json to csv with jq
- #get key headers
- wget "https://randomuser.me/api/?results=20" -qO-|jq -r '.results[0]|(.name)|keys|@csv'
- #get values
- wget "https://randomuser.me/api/?results=20" -qO-|jq -r '.results[]|(.name)|flatten|@csv'
- #using a different delimiter - note that this may not escape out characters the same as csv
- wget "https://randomuser.me/api/?results=20" -qO-|jq -r '.results[]|(.name)|flatten|join("|")'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement