apgapg/json_table

Showing array from array: Error

Closed this issue · 2 comments

The error say:

Unhandled Exception: type 'String' is not a subtype of type 'int' of 'index'

My Json :

"listaGobernanciaPorPiso": [ { "piso": 1, "habitacionesEnPiso": 6, "pasajerosEnPiso": 8, "detalleHabitacion": [ { "habitacion": 2, "pasajerosEnHabitacion": 2, "titular": "JORGE ENRIQUE FERNANDEZ ", "fechaIn": "17-06-2019", "fechaOut": "21-06-2019" } ] }, { "piso": 2, "habitacionesEnPiso": 1, "pasajerosEnPiso": 1, "detalleHabitacion": [ { "habitacion": 10, "pasajerosEnHabitacion": 1, "titular": "ROBERT TAYLOR ", "fechaIn": "18-06-2019", "fechaOut": "23-06-2019" } ] } ],

So, this is possible with this library? or the problem is when extract the json?

jsonResponse['gobernanciaResponse']['listaGobernanciaPorPiso']['detalleHabitacion']

And when extract only this:

jsonResponse['gobernanciaResponse']['listaGobernanciaPorPiso']

No showing error, but all data is empty.
Screen Shot 2019-09-09 at 10 29 41 PM

Can help me?

The data to be passed in JsonTable must be a list of Map. If any other data is passed, it will give error

Also the map passed must not be nested. It should be flat