Re:Jq – A Command-line JSON processor
by drdoom on Monday April 27, 2015 @04:21PM
(#9448844)
Thanks! Now, it looks more interesting...
[ Parent
| on HN ]
Based on @aquassaut's answer, I tweaked it a little, and this should do it.
echo '[{"name":"john", "grades":[1,2,3]}, {"name":"jane", "grades":[4,5,6]}]' | jq -r '.[] | "\(.name),\(.grades|.[])"' | paste -sd' ' -