I have been searching for hours with no luck on this although I am sure it is something simple and obvious. I have the below JSON object which I receive from an API call as a string and then use JSON.parse to make into an object. I can use standard notation like obj.Header.Statuscode or obj.Body to access the data. However, no matter what I try I cannot access the LIPIdList object. I thought it should be accessible via obj.Body.LIPIdList but I get an undefined error. Please can someone explain to me what I am missing here? Thanks so much!
{ "CommuniqueType": "ReadResponse",
"Header": {
"MessageBodyType": "OneLIPIdListDefinition",
"StatusCode": "200 OK",
"Url": "/server/2/id" },
"Body": {
"LIPIdList": {
"Devices": [
{
"Name": "Smart Bridge",
"ID": 1,
"Buttons": [
{
"Name": "Test",
"Number": 1
},
]
},
{
"Name": "Pico Test",
"ID": 3,
"Buttons": [
{
"Number": 2
},
{
"Number": 3
},
{
"Number": 4
},
{
"Number": 5
},
{
"Number": 6
}
]
}
],
"Zones": [
{
"Name": "Office",
"ID": 2
}
]
}}}