How can I convert my JSON to CSV using jq?
Using perl wasn't a good solution for me but after a bit of trial and error I figured out you can do it with just jq
using the join()
operator.
First make an array of the output you need, then join the array elements using commas.
jq -r '[.case, .custom."speech invoked", .custom."input method"] | join(", ")'
Enjoy. :)