Is there a way to do this ? Or with oderByValue ? Any other mean ?
fb.orderByChild('upvotes - downvotes').startAt(_start).endAt(_end).limitToLast(_n).on("child_added", function(dataSnapshot) {
data.push(dataSnapshot.val());
});
P.S.: Yes, I already though about creating a third entry in the database that keeps track of (upvotes-downvotes), but that is what I would like to avoid here.