I\'m trying to create a JSON-serialized array. When that array contains only one item I get a string, not an array of strings (in JSON).
Multiple Items (works as exp
Faced the same issue today. Just to add, if you have an object like this
@{ op="replace"; path="clientName"; value="foo"}
then you have to specify it as
ConvertTo-Json @( @{ op="replace"; path="clientName"; value="foo"} )
The double @s can become confusing sometimes.