Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Create table from multi nested Array (JSON)

$
0
0

OK, I can usually get PowerShell to do what I want but I'm no programmer and this is starting to go beyond my knowledge but it is really bugging me as it seems so simple.

We connect to several supplier Webservies to retrieve usage data, up to now I have managed to get powershell to manipulate it etc. and output the data in a compatible format for our billing system. This time the API it returning very nested JSON Data. Which I don't seem to be able to flatten.

So:

Powershell
$report=Invoke-WebRequest-URI$reportURL-MethodGet-Headers$headersCall|ConvertFrom-Json
Gets me my data which an extract of which in raw JSON looks like this:
Powershell
{"timestamp":1473550296123,"companySeatUsages":[{"timestamp":1473550296123,"companyName":"ABC Ltd","productSeatUsages":[{"product":"psbWorkstationSecurity","summary":{...

Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>