Hi, 

I looked for this problem here on the site and realized that many here also had it. But of the solutions proposed here, none of them I managed to do it correctly.

My error is as follows

And my request is like this:

The firebase database has this structure:

Can anyone here help me ?

Hey Joao,

Those structures "0, 6, 7, 8, 10" are lists.
The way you create lists in JSON is with [ ] instead of { }.
For more information:
https://www.w3schools.com/js/js_json_arrays.asp

Best regards,
Jose Torrao

José Torrão wrote:

Hey Joao,

Those structures "0, 6, 7, 8, 10" are lists.
The way you create lists in JSON is with [ ] instead of { }.
For more information:
https://www.w3schools.com/js/js_json_arrays.asp

Best regards,
Jose Torrao

Hi José,


Where exactly should I change the structure ?

In the body response ?


Hey Joao,

Something like this:
{
"0": [
{
"Company": "ab",
"Date": "2019-07-18",
"Name": "Jones",
"Plate": "abc",
"Telephone": "24354321"
}
],
......

Best Regards,

Jose Torrao

José Torrão wrote:

Hey Joao,

Something like this:
{
"0": [
{
"Company": "ab",
"Date": "2019-07-18",
"Name": "Jones",
"Plate": "abc",
"Telephone": "24354321"
}
],
......

Best Regards,

Jose Torrao


I still have the same error.

Obs: I changed the response body of my get all method