I have JSON response like below
{
"XYZ": {
"ABC": {
"PQR": [
{
"details": {
"date":1221,
"number": 30
}
}
]
}
}
}
I want to fetch the details of "date" and "number" directly. without parsing separately XYZ, ABC,PQR AND details.
struct Trial: Mappable {
var PQR!
init() {}
init?(map: Map) {}
mutating func mapping(map: Map) {
trialPeriod <- map["XYZ.ABC.PQR"]
}
}
I am to parse till PQR. After that, I am not able to parse. Could you please let me know how to get "details" after parsing till PQR??
OR
Let me know how to get the parse directly to a number? I tried many times but could not able to do so.