Powershell: l parsing nested JSON

Question:

I’ve been working with PowerShell to retrieves the results of an API call to Brightpearl as a JSON string:

I want to retrieve just the section called results….

Using ConvertFrom-Json($BpResults.Content), I get only the outer JSON….

I think maybe some of the rest would be obtainable by digging into the System.Object[]…but can’t figure out the syntax to access that. Ideally, I want to take the results to write out to .CSV file.

Any ideas?

Answer:


then you can address them like:

Source:

Powershell: l parsing nested JSON by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply