Map your objects from MBurger objects
class Home: NSObject {
@objc var title: URL?
@objc var homeDescription: String?
@objc var images: [MBImage]?
}static func mappingDictionary() -> [String: String] {
return [“title”: “title”,
“description”: “homeDescription”,
“images”:“images”]
}self.homes = sections.map({ section -> Home in
let home = Home()
section.mapElements(to: home, withMapping: Home.mappingDictionary())
return home
}Last updated