{
"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"
}
]
}
]
}
]
}
Saya sudah mencoba pendekatan di bawah ini, tetapi mendapatkan kesalahan
Tidak dapat mengindeks array dengan string "Judul"
jq -r '.content[]|[.Title,.brand,.characteristics,.value]' $jsonfile.
Saya mencoba pada baris yang sama dengan bagian lain, tetapi mendapatkan kesalahan yang sama.
Bagaimana saya mengatasi masalah ini?
Output yang diharapkan:
abc,xyz,90,Normal.
abc,xyz,100,high.
abc,xyz,80,low