Loading...

jq error “object is not valid in a csv row”

Answer #1 100 %

You need to use flatten to explode/flatten the arrays first, before you can store the data as CSV. This will create a record for each element of the array.

$ jq -r 'flatten | @csv' output2.json
"193.176.211.70","2697131889764497b2beef1bac8e742d"
"193.176.211.70","2697131889764497b2beef1bac8e742d"
"205.169.39.30"
"65.155.30.101"
"45.64.241.129","2697131889764497b2beef1bac8e742d"
"45.64.241.129","2697131889764497b2beef1bac8e742d"
Tags: bashjq

You’ll also like:


© 2022 CodeForDev.com -