I have a list of post. Each post contain firebase servervalue timestamp in createdAt.
let say, my post titles are 1,2,3,4,5. When i do this query.
const userPostsRef = database.ref(`userPosts/${uid}`)
.orderByChild('createdAt').limitToLast(10);`
And it still return 1,2,3,4,5. What I want is 5,4,3,2,1
I tried to navigative timestamp and it works. Why? and is that mean i have to use another child orderTimestamp with negative timestamp for reverse query?
Update json
I mean limitToLast();
userPosts
sms|5797235fe618d33da2eb0ad3
-Km2l4HHE3pONRnA2Akp
createdAt: 1496859301233
o: -1496859301233
title: "2"
-Km2l5QQRi1F66LJkM45
createdAt: 1496859305916
o: -1496859305916
title: "3"
-Km2uTa8tAe0G5cJ2U-B
createdAt: 1496861764218
o: -1496861764218
title: "4"
-Km2uUrfwvY90Im06kg4
createdAt: 1496861769435
o: -1496861769435
title: "5"
orderByChild('createdAt')
orderByChild('o')

