I am getting Json as column ID and arrays -
{
"ObjectID": [
0,
1,
2,
3,
4
],
"Name": [
"Apple",
"Orange",
"Grape",
"Banana",
"Jackfruit"
],
"Color": [
"Red",
"Orange",
"Green",
"Yellow",
"null"
],
"Acidity": [
3.9,
3.5,
2.99,
6,
5.0
]
}
I am trying to convert it using jq to to a plain CSV format like -
ObjectID,Name,Color,Acidity
0,Apple,Red,3.9
1,Orange,Orange,3.5
2,Grape,Green,2.99
3,Banana,Yellow,6
4,Jackfruit,null,5.0
Question related to Export JSON to CSV with Headers using JQ . Looking for preferably a generic answer.