I have a database substructure where I keep a count of the number of reports assigned to each admin
The database substructure looks like this
ReportCount
uuid string1: count1
uuid string2: count2
uuid string3: count3
I wish to retrieve this information using
firebase.database().ref('ReportCount').orderByValue().on("value", <Some Function>)
I want to do this to be able to figure out which admin has the least number of reports so a new report can be assigned to that admin. However, when I use orderByValue, I see that the data retrieved is not ordered in ascending nor descending order of count values.
What is the issue here?