![Unix & Linux](http://cdn.sstatic.net/Sites/unix/img/apple-touch-icon.png)
When trying to convert json to csv, I get an error about null with the following jq query:
printf "[]" | jq -r '(map(keys) | add | unique) as $cols | map(. as $row | $cols | map($row[.])) as $rows | $cols, $rows[] | @csv'
It gives the following error,
jq: error (at <stdin>:0): Cannot iterate...