I want to iterate array of dictionary but it gives error that "Value of type 'Any' has no subscripts". I just followed answer provide in link
Here is the array of dictionaries in debug mode:
Here is how I'm trying to do it:
if let markersArray = appDelegate.markersArray{
for marker in markersArray{
let name = marker["name"] as? [String:Any]
}
}
Also tried this way but still doesn't work:
if let markersArray = appDelegate.markersArray{
for marker in markersArray{
let name = marker["name"]
}
}
Here is how 'marker' looks in debug mode:
When I print marker, it prints the right content but unable to extract the data.
Any help will be really appreciated and already tried : link