News for hackers. Stuff that matters.
Re:CSV Challenge by ekimekim on Saturday April 25, 2015 @11:34PM (#9440449)
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

There are no comments on this comment yet.