1
如何添加到PowerShell中的JSON數組?我用下面的代碼嘗試,但它與「收藏是一個固定大小的」異常抱怨:PowerShell如何添加到JSON數組
$json = @"
[
{
"name": "First"
},
{
"name": "Second"
}
]
"@
$toAdd [email protected]"
{
"name": "Third"
}
"@
$jobj = ConvertFrom-Json -InputObject $json
$jobj.Add((ConvertFrom-Json -InputObject $toAdd))