I have an array of objects (allCities) with a nested array of objects ("Residing City"). How can I loop through and access each "City" key's value?
const allCities = [
{
"Residing City": [
{
City: "Tokyo",
Country: "Japan"
},
{
City: "London",
Country: "UK"
},
{
City: "Paris",
Country: "France"
}
],
}
]
question from:https://stackoverflow.com/questions/65845571/accessing-nested-array-of-objects-in-javascript