6 ms·
If we're going for succinctness, you could combine these all together: (echo '"Name","Credit Card"'; jq -r '.[] | select(.creditcard) | [.name, .creditcard] |
by nburger 11y ago
If we're going for succinctness, you could combine these all together:
(echo '"Name","Credit Card"'; jq -r '.[] | select(.creditcard) | [.name, .creditcard] | @csv' data.json) >> `date +%Y%m%d`.csv
- vitorbaptistaa 11y agoNice trick to write the headers, thanks!