How to get sub-tag's value in firebase?

Hi Koders,

I am stuck in a situation where I want to get the values of a tag list’s sub tags.

For example:
[Firebase structure would like this]

        Name: "Google Pixel"
        Name: "Samsung Galaxy S22"

        Name: "OPPO Find X"

I called all tags under /Users/John_Wink/Devices by setting ProjectBucket accordingly using getTagList function of Firebase. But this function only returns IDs of john_Wink. I also want values of all sub-tag of Users/John_wink/Devices/ID2200/Name and also value of Users/John_wink/Devices/ID2300/Name.


This is the error when I am trying to find length of the DeviceName Variable. Seems like GotValue firebase block is not storing list instead it is only storing one value.

I implemented this logic but it returns 2 same values for the same tag.

Any help or idea about how to get this correctly?

Any experienced Koderor or anyone who has an idea. Your help would be appreciated a lot for me.

you want list of device name of the user?

Yes exactly. I want list of the devices of logged in user. But along with tag i also want values

have you tried this method?

I just tried this method but this method doesn’t seems to work for me. It throws runtime error of firebase. My problem is that I am getting two values for the same tag.

Error after applying your suggested method

No project bucket used.


Is this what you are looking?

Yes something like this. I’m trying your blocks. Can you please share full blocks as this image is cropped from edges?

thats is the full blocks, no worry ( I am sharing MIT blocks now)

1 Like


Firebase’s structure




Both solutions worked for me. But with using firebase blocks only is quite easy to implement. Thanks a lot both you of @Still-learning @dora_paz for always helping with our doubts :smiley:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.