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

Categories

I have a question about firebase sorting.

I have the next database:

{
    "-Ka8xxTgyFB8yYKH50j_addclose" : {
        "number" : 0,
        "point" : 949739,
        "timestamp" : 14824078463440,
        "username" : "Test 16062"
    },
    "-Ka8xzKecpbPr46Kx9gl" : {
        "number" : 0,
        "point" : 1480851,
        "timestamp" : 14842078463441,
        "username" : "Test 13599"
    }
}

I want to display data sorted by point. But i need rows only which created today.

If i filter the rows for timestamp:

return databaseReference
                .child("list")
                .orderByChild("timestamp")
                .endAt(end.getTime());

The endAt is work good. Only todays rows listed. But... Now i need to sort by point.

How can i do it?

There is any idea to change database or sort my list on clientside?

Thanks so much!

See Question&Answers more detail:os

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

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...