3 ms·
I used jq as well, though instead of doing a seperate echo I did this: ([{name: "name", creditcard: "creditcard"}] + .)[] instead of .[] Another less hac
by ekimekim 12y ago
I used jq as well, though instead of doing a seperate echo I did this:
([{name: "name", creditcard: "creditcard"}] + .)[]
instead of .[]
Another less hacky way would be:
[["name", "creditcard"]] + map(select(.creditcard) | [.name, .creditcard]) | .[] | @csv