Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct Place {
- var name: String?
- var address: String?
- var rating: Double?
- var openStatus: Bool?
- init(attributes: [String: Any]) {
- self.address = attributes["vicinity"] as? String
- self.name = attributes["name"] as? String
- self.rating = attributes["rating"] as? Double
- if let openingHours = attributes["opening_hours"] as? [String: Any] {
- self.openStatus = openingHours["open_now"] as? Bool
- }
- }
- }
Add Comment
Please, Sign In to add comment