I'm retrieving firebase data back as a dictionary of dictionary:
guard let data = snapshot.value as? [String: [String:Int]] else {
And I'm trying to retrieve the first key(?) as in if it comes back as a result like this:
"café-veritas": ["AmpleSeating": 1, "Organic": 1, "Quiet": 1, "AmpleOutletAccess": 1, "Couch": 1, "Loud": 1, "GlutenFree": 1, "FreeWifi": 1],
"cafe-myriade": ["Terasse": 1, "LaptopFriendly": 1, "Quiet": 1, "FreeWifi": 1, "FastWifi ": 1, "GlutenFree": 1],
I'm trying to put the name of the cafes, "café-veritas" and "cafe-myriade" into an array. I'm told to use the map function but I'm not sure how. Would it be like this?
let array = data.map { yelp IDs in yelpIDs}
I'm basically trying to get the key back so that all it is is just the cafe name. Thanks!