Sort
Opened this issue · 1 comments
sfxworks commented
Do all of these methods work?
https://firebase.google.com/docs/database/rest/retrieve-data
I am trying to order my data alphabetically. After I turn my data into an Object I can't turn it into an array and sort it.
var sorted:Array = e.data //JSON.parse result
sorted.sortOn("1");
I saw that REST isn't able to keep list items at order either. I want to sort all the items I get from a JSON node alphanumerically.
agentphantom commented
You are correct, Firebase always returns the data scrambled and you are required to sort it in client side.
Please take a look at this function, it shows you how you can recursively convert the JSON into an Array, sort it and pass it to a data provider.