Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Showing array from array: Error #7

Closed
xhidnoda opened this issue Sep 10, 2019 · 2 comments
Closed

Showing array from array: Error #7

xhidnoda opened this issue Sep 10, 2019 · 2 comments

Comments

@xhidnoda
Copy link

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?

@apgapg
Copy link
Owner

apgapg commented Sep 10, 2019

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

@apgapg
Copy link
Owner

apgapg commented Sep 10, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants