Comment Comment by th0br0 You forgot the select(.creditcard) - see my comment on the gist - as this one does not filter out null'ed creditcards: name=`date +'%Y%m%d'`; echo "name,creditcard" > $name; jq -r '.[] | select(.creditcard) | [.name, .creditcard] | @csv' data.json >> $name parent th0br0 11 years ago