我正在创建一个Powershell脚本,它将使用Azure DevOps REST更新工作项中的特定字段。我将请求主体作为哈希表,然后在发出请求时转换为JSON。
在提出请求时,我会得到以下错误:
{"$id":"1","innerException":null,"message":"You must pass a valid patch document in the body of the
| request.","typeName":"Microsoft.VisualStu
我有以下ps/json:
$a = '[{"Type":"1","Name":"A"},{"Type":"2","Name":"B"}]'
$ps = $a | ConvertFrom-Json
Type Name
---- ----
1 A
2 B
#Now, I want to add this array into another array, so the resulting json should look like this: