Firebase get tag list inside tag

So imagine i have this structure in my firebase database:

project-id
category1
element1: “example_value”
element2: “example_value”
category2
element3: “example_value”
element4: “example_value”

In my app i have a listview. I want to set the elements of that listview to the tags “element1” and “element2”. So i have tried two things:

The fist thing i have tried is to call firebase get value with tag “category1”, and when firebase got value, i tried set listview elements to get value, but when doing this an error pops up, and i think it gets as a value this: “element1=example_value” (it gets tag + value as a whole value).

The second thing that i have tried is to use firebase get tag list. It works perfectly, but sets the listview elements to “category1” and “category2”, and i want the elements to be THE TAGS that are inside of those categories.

Any ideas for a solution?

Set firebase project bucket to I’d/Category 1 to get element 1 and 2

Well, at the end I had to set the project bucket to something/something_else, because the example I posted was simplified. Even that, it worked! Thanks.

Now I’m facing another problem. I will leave here my blocks:

So, when I call “sync”, all my listviews get fullfilled with the audios that correspond, but for some strange reason, once the “sync” has ended, the lists continue updating, and its elements change continuously. So in one same list, I can see the “Artur” audios, and one second later i can see all the “Carles” audios, and it continues like that without ending…

1 Like