New-UDGrid and nested values

I am running an API query in my New-UDGrid

            New-UDColumn -Size 6 -Content {
                New-UDGrid -Title "vMon services" -FontColor "#cbd9ef" -BackgroundColor "#303235" -Headers @("key","startup_type","state","health") -Properties @("value.name_key","value.startup_type","value.state","") -AutoRefresh -RefreshInterval 60 -Endpoint {
                    (Invoke-RestMethod -headers $session -method GET -uri "").value | Out-UDGridData

with the output being

    "value": [
            "value": {
                "name_key": "",
                "startup_type": "AUTOMATIC",
                "health_messages": [],
                "health": "HEALTHY",
                "description_key": "",
                "state": "STARTED"
            "key": "analytics"

how would I go about extracting just the “key” and “health” values? If run the above I get a “404 not found” error on the grid

fixed it

wrong URI being specified

1 Like