- Home /
How does Firebase realtime database work?
I want to know 'children count' for a specific variable in the Firebase realtime database, I know that I can do that with the 'DataSnapShot' class. The issue is: when I create a for loop in the value request I want it to loop depend on children count number but that don't happen, it loops only two times and I don't know why!!
cap.png
(6.1 kB)
Comment
Answer by EvangelosBilis · Nov 15, 2018 at 11:16 AM
Since your question leaves many things open to interpretation, I'll try to be as helpful as I can:
How many immediate children are in your database ref
myDatabaseRef.Child("xxxxxxx")
?Are you sure about the ref in your database?
Have you tried logging the value of
snap.ChildrenCount
? Is it > 2 or is it exactly 2?
Your answer
![](https://koobas.hobune.stream/wayback/20220612182156im_/https://answers.unity.com/themes/thub/images/avi.jpg)