I have a dictionary assigned to a variable restaurant from this API.
I am trying to assign.
let restaurantLat = restaurants[indexPath.row]["geometry"]!["location"]!!["lat"] as? String
This is showing an error:
type any has subscript members.
I have a dictionary assigned to a variable restaurant from this API.
I am trying to assign.
let restaurantLat = restaurants[indexPath.row]["geometry"]!["location"]!!["lat"] as? String
This is showing an error:
type any has subscript members.
Access json output data as below:
let restaurantLat = restaurants["results"][indexPath.row]["geometry"]!["location"]!!["lat"] as? String
Because results key contain list of array.