I have a javascript object called event which is output from the console.log below:
{
"title": "Test Title",
"location": "Test Location",
"isAllday": false,
"isPrivate": false,
"state": "Busy",
"start": {
"tzOffset": null,
"d": {
"d": "2023-01-03T16:00:00.000Z"
}
},
"end": {
"tzOffset": null,
"d": {
"d": "2023-01-03T16:30:00.000Z"
}
},
"id": "afdb82fd-fddd-58ce-bd0b-ab0beb2bce7b"
}
I can access some items through alert(event['title'] + event['location']);
I cannot access the nested items like start.tzOffset.d
If I try alert(event['title'] + event['start']['tzOffset']['d']); I get an error "Uncaught TypeError: Cannot read properties of null (reading 'd')"
Any help greatly appreciated.