[Solved] Not able to fetch the individual details from JSON data

You don’t need to use foreach for this. You can just use Select-Object for this. Assuming your JSON is as @Mark Wragg linked in the comments: $Json = @’ [{ “Ns”: { “value”: [{ “Nname”: “exa”, “SR”: [{ “name”: “port1”, “properties”: { “description”: “Allow port1”, “destinationPortRange”: “1111”, “priority”: 100 } }, { “name”: “port1_0”, “properties”: … Read more