FirebaseExtended / firebase-arduino

Arduino samples for Firebase.
Apache License 2.0
943 stars 494 forks source link

Fetching data from firebase #431

Open Yasserhxh opened 5 years ago

Yasserhxh commented 5 years ago

I am new in Arduino and Firebase, and i found some problems for retrieving the Keys and their Values from Firebase.

This is the Json format of my database :

{

"USERS" : { "US1" : "58:D9:3T:42", "US3" : "OIDFDVB", "us2" : "6U:32:0P:K3" } }

And i want the second users info, without hardcoding the path.

i tried this code : /KINDA WORKING /

error

But the if condition doesnt work and the name of the first key always get corrupted and i don't how to fix it ..

Please some help.

PrateekGoyal18 commented 4 years ago

The above code snippet has a small bug (which is mentioned on the original writer's answer #187) that the first value can't be read and is corrupted. The only fix is to initialize a sub-field with the name "AAAAA" and set that to any value so that it will be the first to read and will not bother our readings.