Hello! I´m working with Realm in Swift and have to map a json readed from a service with the this structure:
{
"message": "",
"status": "OK",
"data": {
"planesSesion": [
{
"nombre": "registro.turista.planDefecto",
"id": 455412,
"etapas": [],
},
{
"nombre": "Camino Francés PErsoal",
"id": 1247065,
"etapas": [
[
{
"id": 1247066,
"class": "gal.smart.turista.util.sesion.TramoSesion",
},
{
"id": 1247067,
"class": "gal.smart.turista.util.sesion.TramoSesion",
},
{
"id": 1247068,
"class": "gal.smart.turista.util.sesion.TramoSesion",
},
{
"id": 1247069,
"class": "gal.smart.turista.util.sesion.TramoSesion",
}
],
[
{
"id": 1247072,
"class": "gal.smart.turista.util.sesion.TramoSesion",
},
{
"id": 1247073,
"class": "gal.smart.turista.util.sesion.TramoSesion",
}
],
]
}
}
How can I declare “etapas” and his content to be mappable? Im getting error because is an array of arrays and trying to declare a list of an object who is a list too is always getting error “Expected to decode Dictionary<String, Any> but found an array instead.”
Best Regards!