I have below JSON file that gets parsed with ConvertFrom-Json command:
{
"item1": {
"class": "class1",
"price": "price1"
},
"item2": {
"class": "class2",
"price": "price2"
}
}
This creates a PSCustomObject with two properties item1 and item2. It produces below output:
item1 item2
----- -----
@{class=class1; price=price1} @{class=class2; price=price2}
What I need instead is an array that prints:
name class price
---- ----- -----
item1 class1 price1
item2 class2 price2
Please note that I cannot modify the content of JSON file.
Any kind of help is much appreciated.