I am trying to get into Powershell and am trying to convert a simple JSON file to table format.
The json-file looks like this:
{ "Members" : [
{ "Id" : 1,
"Details" : [ { "FirstName" : "Adam" }, { "LastName" : "Ant" } ] },
{ "Id" : 2,
"Details" : [ { "FirstName" : "Ben" }, { "LastName" : "Boggs" } ] },
{ "Id" : 3,
"Details" : [ { "FirstName" : "Carl"} , { "LastName" : "Cox" } ] }
]
}
Powershell expression:
$jString.Members.details | Select-Object -Property Id, FirstName, LastName
output so far (best I got).. id missing
Id FirstName LastName
-- --------- --------
Adam Ant
Ben Boggs
Carl Cox
How would I accomplish that?
Any help appreciated