我需要決議以下復雜的 json 并將結果輸出到檔案。我能夠決議 .result 物件。但是我需要決議串列“com.src.main.client.details”并將其通過管道傳輸到另一個檔案。
我嘗試了以下命令,但失敗了。
$> jq ".result[0].com.src.main.client.details" temp.json > result.json
null
有人可以在這里幫助我。
"results": [
{"com.src.main.client.details":{
"doc": "string",
"details": [
{
"amount": null,
"output": null,
"properties": [
{
"characteristic": [],
"component": null,
"period": null,
"internals": {
"Currency": "EUR",
"value": 0
}
}
}```
uj5u.com熱心網友回復:
對包含非字母數字字符的鍵使用雙引號:
.results[0]."com.src.main.client.details"
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/367699.html
