Using firebaseArray, is it possible to order by a specified child key:
(https://www.firebase.com/docs/web/guide/retrieving-data.html#section-queries)?
var fireRef = new Firebase(https://dinosaur-facts.firebaseio.com/dinosaurs);
var query = fireRef.orderByChild("echo").limitToFirst(25);
var todos = $firebaseArray(query);
However, by default, Firebase retrieves the keys in ascending order.
Children with a numeric value come next, sorted in ascending order.
Is there any way to get results in the descending order directly from firebaseArray? For example, do they have anything like .reverse()
or .orderBy(desc, ...)
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…