I'm trying to iterate through a nested array object like below. What is the best way to access each of the object elements within the nested arrays.
{
"titleId": "111G",
"aNumber": "1212",
"data": [{
"id": "6657",
"name": "test name",
"city": "LA",
"state": "CA",
"comment": "comment 1",
"dates": [{
"startDate": "01/17/2020",
"endDate": "01/22/2020"
},
{
"startDate": "01/24/2020",
"endDate": "01/30/2020"
}
]
},
{
"id": "123",
"name": "abc",
"city": "NJ",
"state": "NY",
"comment": "comment 2",
"dates": [{
"startDate": "01/17/2020",
"endDate": "01/22/2020"
},
{
"startDate": "01/24/2020",
"endDate": "01/30/2020"
}
]
}
]
}
I need to access each of the elements in data and the dates array as well