Hi
How to parse json array of strings like "[\"one\", \"two\", \"three\", \"four\", \"five\"]" ?
this is a root json string array without any key...
so how can i implement Mapping method without any key?
class Cities: Mappable {
var array: Array<String>?
init() {
}
required init?(map: Map) {
}
// Mappable
func mapping(map: Map) {
array <- map[""]
}
}
You can use the following:
let array = Mapper<Object>().mapArray(JSONString: json)
Most helpful comment
You can use the following: