Iterate over JSON and remove JSON element in PowerShell
问题 Pasted below is my sample JSON file. Loop over all the unqiue properties For each unique property check the value of "x-visibility": "Private" object. If this is "Private" then remove the entire object. I m trying to do this foreach ($p in $apijson.paths.PSObject.Properties.Value) { $get = $p.get.'x-qlik-visibility' -eq 'Private' if ($get -eq 'True') { Write-Host 'Removing Object :'$p # Remove-ItemProperty -Name $p.get $apijsonNew.PSObject.Properties.Remove($p) } } { "swagger": "2.0", "info":