I need your help for parsing below json file and converting them to csv using jq command.
{
"id": 15,
"description": "package",
"active": true,
"name": "linux",
"project": [
{
"id": 1762,
"description": "This Red Hat Server 7 is built from the Redhat Official",
"path": "x86_24",
"url": "some url"
},
{
"id": 1663,
"description": "This Ubuntu 20.04 is built from the Ubuntu Official",
"path": "x86_24",
"url": "some url"
},
{
"id": 1557,
"description": "This Centos 7 is built from the Centos Official",
"path": "x86_24",
"url": "some url"
}
]
}
{
"id": 22,
"description": "exe",
"active": true,
"name": "windows",
"project": []
}
{
"id": 34,
"description": "brew",
"active": true,
"name": "mac",
"project": []
}
The values which I need from this json is: id, description, project.id, project.description, project.url. I tried doing with jq cmd, but at last my csv is getting messed up. Here id holds project, project has multiple ids. I need to separate them and generate my csv like below. I'm stuck up here. Any solution for this ? Thanks in Advance !
