Hi everyone,
So I am pulling my hair out over this. Hope someone can help.
I have successfully implemented the Firebase plugin, and I have data in my Firebase database. I am now trying to get data back from the Firebase database.
The problem is that when I decode the JSON data, and loop through it (using kev/value pairs iteration), it looks like this in the console:
Pablo table: 0x7ffc8d14ab40
GGEspresso table: 0x7ffc8d14a090
Here is my code:
myNewData = e.response local myTable = json.decode(myNewData) for key,value in pairs(myTable) do -- for k,v in pairs(value) do print(key,value) -- end end print( "---------------------" ) end end)
Even if I drill down further, by adding another for loop :
myNewData = e.response local myTable = json.decode(myNewData) for key,value in pairs(myTable) do for k,v in pairs(value) do -- This is the new for loop print(key,value) end end print( "---------------------" ) end end)
It gets data, but I still have other nested tables that show up as table: 0x7ffc8d14ab40
What am I doing wrong? I want to loop through all tables (and nested tables) in one iteration loop.
Any help would be greatly appreciated!
Thanks!