JSON object values into CSV with jq
qmacro.org
qmacro.org
$ jq -n -r '[{"a": "b", "foo": "bar"}, {"c": "d", "baz": "quux"}] | .[] | [ keys_unsorted[] as $k | .[$k] ] | @csv'
"b","bar"
"d","quux"
$ jq -n -r '[{"a": "b", "foo": "bar"}, {"c": "d", "baz": "quux"}] | .[] | to_entries | map(.value) | @csv'
"b","bar"
"d","quux"
FWIW, OP uses `keys` instead of `keys_unsorted` which makes a specific assumption about the shape of the input objects. YMMV.