Powershell: Compare-object not comparing nested objects
Don't know if it's any better or not, but:
$jsonString1 = '{ "baz": "quuz", "cow": [ "moo", "CUD" ], "foo": "bar" }'$jsonstring2 = '{ "baz": "quuz", "cow": [ "moo", "GRASS" ], "foo": "bar" }'compare $jsonString1.split(',:[]{}') $jsonString2.split(',:[]{}')InputObject SideIndicator ----------- ------------- "GRASS" => "CUD" <=