{
"content": [
{
"Title": "abc",
"brand": "xyz",
"size": "5 g",
"date": "2019-01-01",
"details": {
"Temperature": [
{
"value": "90",
"characteristics":"Normal"
},
{
"value":"100",
"characteristics":"high"
},
{
"value":"80",
"characteristics":"low"
}
],
"certifications": [
{
"value": "based",
"characteristics":"pass"
},
{
"value": "50",
"characteristics":"failed"
}
]
},
"formats": {
"city": "NYC",
"id": "007",
"manufacture":""
},
"innerDetails": [
{
"contains": "abc",
"panel":"xyz",
"values":[
{
"name":"abc",
"value":"10"
},
{
"name":"xyz",
"value":"20"
}
]
}
]
}
]
}
J'ai essayé l'approche ci-dessous, mais j'obtiens l'erreur
Impossible d'indexer le tableau avec la chaîne "Title"
jq -r '.content[]|[.Title,.brand,.characteristics,.value]' $jsonfile.
J'essayais sur la même ligne avec d'autres sections, mais j'obtenais la même erreur.
Comment résoudre ce problème?
Production attendue:
abc,xyz,90,Normal.
abc,xyz,100,high.
abc,xyz,80,low