0
我使用下面的curl命令:如何使用bash從json中檢索「name」值?
curl -s -v --user admin:orca --insecure -X GET https://insecure.registry.com/api/v0/repositories/authi-api/tags
獲得以下輸出:
{
"name": "Dev_ReleaseRollout_Lane-3",
"inRegistry": true,
"hashMismatch": false,
"inNotary": false
},
{
"name": "Dev_ReleaseRollout_Lane-latest",
"inRegistry": true,
"hashMismatch": false,
"inNotary": false
},
{
"name": "Payments_Dev_Lane-267",
"inRegistry": true,
"hashMismatch": false,
"inNotary": false
}
我想在一個變量中只得到name
值。
我只需要在一個變量
到目前爲止您已嘗試過哪些命令,它們輸出了什麼? –
你是否得到一個數組:'[[...]''或上面提到的輸出? – andlrc