【发布时间】:2022-11-25 00:05:32
【问题描述】:
我有一个包含以下内容的 json 文件。我想遍历 Powershell 中的每个项目(使用 foreach 循环)。 我该怎么做?
{
"abc": {
"isSecret": null,
"value": "'167401'"
},
"dar": {
"isSecret": null,
"value": "8980"
},
"hgt": {
"isSecret": null,
"value": "893240"
},
"newvar1": {
"isSecret": null,
"value": "newvalue1"
},
"var": {
"isSecret": null,
"value": "1230"
}
}
【问题讨论】:
-
您使用的是什么版本的 powershell?
-
P版本:5.1.19041.1682
-
ConvertFrom-Json。
标签: json powershell