【发布时间】:2020-11-10 04:04:04
【问题描述】:
$primaryEndpoints = az storage account show --resource-group rg --name sto --query 'primaryEndpoints'
以上命令返回
{
"blob": "https://sto.blob.core.windows.net/",
"dfs": null,
"file": "https://sto.file.core.windows.net/",
"internetEndpoints": null,
"microsoftEndpoints": null,
"queue": "https://sto.queue.core.windows.net/",
"table": "https://sto.table.core.windows.net/",
"web": null
}
但是他下面的命令什么也没返回:
echo $primaryEndpoints["blob"]
我也试过
echo $primaryEndpoints.blob
如何访问 json 属性?
【问题讨论】:
标签: json powershell powershell-4.0