Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
690 views
in Technique[技术] by (71.8m points)

firebase - firebaseArray descending order?

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...