Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game["id", "user":["id"]]
- game.id and game.user.id
- import ObjectMapper
- class GamesData: Mappable {
- var id: String? = ""
- var user = [UsersData]()
- convenience required init?(map: Map) {
- self.init(map: map)
- }
- func mapping(map: Map) {
- id <- map["id"]
- user <- map["user"]
- }
- }
- import ObjectMapper
- class UsersData: Mappable {
- var id: String? = ""
- convenience required init?(map: Map) {
- self.init(map: map)
- }
- func mapping(map: Map) {
- id <- map["id"]
- }
- }
Add Comment
Please, Sign In to add comment