I take the modified command from the jq tutorial :
curl 'https://api.github.com/repos/stedolan/jq/commits?per_page=5' \ | jq -r -c '.[] | {message: .commit.message, name: .commit.committer.name} | [.[]] | @csv'
What makes csv good to export but no headers:
"Fix README","Nicolas Williams" "README: send questions to SO and Freenode","Nicolas Williams" "usage() should check fprintf() result (fix #771)","Nicolas Williams" "Use jv_mem_alloc() in compile.c (fix #771)","Nicolas Williams" "Fix header guards (fix #770)","Nicolas Williams"
How to add a title (in this case message,name ) at the top? (I know this is possible manually, but how to do it in jq ?)
json csv jq
Anton Tarasenko
source share