3 ms·
Looks interesting. Given this json, [{"name":"john", "grades":[1,2,3]}, {"name":"jane", "grades":[4,5,6]}], can it print it out as this: john,1 john,2 john,3 j
by drdoom 11y ago
Looks interesting. Given this json,
[{"name":"john", "grades":[1,2,3]}, {"name":"jane", "grades":[4,5,6]}],
can it print it out as this:
john,1
john,2
john,3
jane,4
jane,5
jane,6
- aquassaut 11y agoYes, kind of like so: echo '[{"name":"john", "grades":[1,2,3]}, {"name":"jane", "grades":[4,5,6]}]'| jq '.[]| "\(.name), \(.grades|.[])"'