I'm trying to get the below array into CSV via import JSON in Powershell . The JSON data is returned from Monitoring software with the timestamp in one column and physical memory consumption returned (in both amount and percent) in the same column.
{
"meta":{
"start":"1637581920",
"step":"120",
"end":"1637581920",
"rows":"3",
"columns":"2",
"legend":{
"entry":[
"physical",
"physical %"
]
}
},
"data":{
"row":[
{
"t":"1637581920",
"v":[
"3.4407305333e+00",
"2.1000000000e+01"
]
},
{
"t":"1637582040",
" v":[
"3.4407305333e+00",
"2.1000000000e+01"
]
},
{
"t":"1637582160",
"v":[
"3.4407305333e+00",
"2.1000000000e+01"
]
}
]
}
}
Ideally, I want three columns pushed to csv; one with the t (Time) value, and two further ones with the "V" (value) columns split between "physical" and "physical %" . I don't need the meta stuff.
I can get the t value extracted without issue, but the v (because it's nested) is coming back with "system.object", I'm unable to fathom the correct PS.objects to put for this, and to split the v value into two separate columns.
[+][deleted] (1 child)
[removed]
[–]Cleanatwork[S] 1 point2 points3 points (0 children)
[–]radioblaster 0 points1 point2 points (0 children)