请原谅我的英语,我不是母语人士
我是新手,所以我不太了解
我正在尝试使用 xidel 在 windows cmd 中使用以下命令从 json 文件中提取一些值,但它不起作用
xidel MyFile.json -e '$json//options/option/*[@option_id="D-ES"]/content_id'
一般json文件有英文、西班牙文和葡萄牙文三个选项,我只想要和西班牙文相关的所有值
我想提取以下值
"group_id": "******",
"content_id": "******",
"current_content": "*****",
"option_id": "D-ES",
"subtitle": *****,
"id": "ES",
"desc": "Español",
并将提取的值如下
"group_id"-"*****","content_id"-"*****","current_content"-"*****","option_id"-"D-ES"-"subtitle"- *****,"id"- "ES""desc"- "Español",
这是我的 json 文件的一部分
{
"original": {
"id": "ING",
"desc": "Inglés"
},
"dubbed": "true",
"subbed": "false",
"options": {
"option": [
{
"group_id": "922450",
"content_id": "284951",
"current_content": "false",
"option_id": "D-ES",
"audio": "ES",
"subtitle": null,
"option_name": "dubbed",
"id": "ES",
"desc": "Español",
"label_short": "Dob. Español",
"label_large": "Doblada al Español",
"intro_start_time": null,
"intro_finish_time": null,
},
{
"group_id": "275495",
"content_id": "243856",
"current_content": "false",
"option_id": "D-PT",
"audio": "PT",
"subtitle": null,
"option_name": "dubbed",
"id": "PT",
"desc": "Portugués",
"label_short": "Dob. Portugués",
"label_large": "Doblada al Portugués",
"intro_start_time": null,
"intro_finish_time": null,
},
{
"group_id": "248954",
"content_id": "245238",
"current_content": "false",
"option_id": "O-EN",
"audio": "ORIGINAL",
"subtitle": null,
"option_name": "original",
"id": "EN",
"desc": "Inglés",
"label_short": "Id. Inglés",
"label_large": "Idioma Original Inglés",
"intro_start_time": null,
"intro_finish_time": null,
}
]
}
}
我应该使用什么命令来提取与西班牙语相关的值?