I have a Json-response stored as a powershell object if I convert it back to JSON it looks like this:
[
{
"Guid": "69613454-c846-41c8-b4f2-e29a086c93c0",
"object": [
{
"id": "1",
"value": "Example 1"
},
{
"id": "2",
"value": "Example 2"
},
{
"id": "3",
"value": "Example 3"
}
]
},
{
"Guid": "507610ac-fe09-46bb-ad3d-7948008e5687",
"object": [
{
"id": "1",
"value": "Example 4"
},
{
"id": "2",
"value": "Example 5"
},
{
"id": "3",
"value": "Example 6"
}
]
}
]
And if I list the powershell object ($jsonresponse)
Guid object
---- ------
69613454-c846-41c8-b4f2-e29a086c93c0 {@{id=1; value=Example 1}, @{id=2; value=Example 2}, @{id=3; value=Example 3}}
507610ac-fe09-46bb-ad3d-7948008e5687 {@{id=1; value=Example 4}, @{id=2; value=Example 5}, @{id=3; value=Example 6}}
So I'd like to list only two columns, one containing the Guid and the second only the value that belongs to id 1.
Guid object
---- ------
69613454-c846-41c8-b4f2-e29a086c93c0 Example 1
507610ac-fe09-46bb-ad3d-7948008e5687 Example 4
Tried $jsonresponse | Select-Object -Property Guid -ExpandProperty Object
but get Select-Object: The property cannot be processed because the property "guid" already exists.