Closed KompoD closed 6 years ago
@KompoD you should be able map your JSON to the following model class:
class Result: Mappable {
var type: String?
var lastUpdated: Int64?
var list: [[Any]]?
required init?(map: Map) { }
func mapping(map: Map) {
type <- map["type"]
lastUpdated <- map["lastUpdated"]
list <- map["list"]
}
}
using map(JSONString:)
function of Mapper
class like:
let result = Mapper<Result>().map(JSONString: jsonString)
@gcharita Thank you, it works!
My JSON dictionary:
I tried to do this via Codable, but it didn't work well. Do you have some ideas how to map this via ObjectMapper?