Technical Note: Jq Array Transformation

Problem Given a JSON data below, output the data in CSV/TSV format. [ { "id": 0, "data": [0, 1, 2] }, { "id": 1, "data": [1, 2, 3] }, { "id": 2, "data": [3, 4, 5] } ] Expected output. "0\t0,1,2" "1\t1,2,3" "2\t3,4,5" How to JQ provides @tsv and @csv function that convert data to the corresponding format. Each row of the output CSV table should be formated to an array type before these functions can consume.
Read more...