How to store values in Firebase DB in the following way:


I want to store values in Firebase DB in the following format:

What is the best possible way to store the values in my CUPS bucket into tags which are in ascending order… even a hint would be highly appreciated.

When you upload any data in the format like text or number it is always sort out by firebase from 0 to Z that means from 0 to 9 and A to Z.

I know that.
I think you couldn’t catch my question.
I am asking like how to create a numbered tags on a button click… and every time the button is clicked, the new numbered tag is 1 added to the greatest numbered tag..

I hope you are able to understand now.


Use global variable for that.

Set it to 0.

When button click, set variable value to [get variable value + 1]

Use add value block from math.

And also with this process store value to firebase by using this variable value.