If the values in “Thumb” list do not have numeric keys, can I still read the last 5 values? I want to get the list of values under “Thumb” which may be either 0 or 1. I am not interested in the long string of serial numbers.
One thing you can do is to export your Firebase database as JSON. And then paste it into Best JSON Viewer and JSON Beautifier Online. There, you can click on a value like “Thumb” or a serial # to see the path to that property.
I have to read the firebase values in real-time, as new values are always getting updated every few seconds, where I need to get the last 5 values of each list (for example, Thumb)…
Do you know how I can get the last 5 values using Thunkable blocks only? And without putting the names ((the serial numbers) of the property into the blocks, as the serial numbers will change over time?
If you export the JSON from Firebase and paste it here (be sure to format it with the </> button in the forums toolbar), I can help with your question. It’s going to be something like the “Thumb[1]” property of the JSON object but again, without the actual JSON text it’s hard for me to be specific here.
Get the thumb bucket object
Get the keys in the object
Iterate over the keys within the object
Extract the relevant value and throw into a new variable
thank you SO much for your response! I watched the video you sent as well as used the json formatter, they were very useful. After a couple hours of trial and error, I am able to get the data in Thunkable!
I am really grateful for all the help you gave even for all the other questions that I had posted!