firebase orderbychild descending code example
Example 1: firebase order by key descending
firebase.database().ref('books').orderByChild('ups').limitToLast(2)
Example 2: firebase orderbychild update
database.ref('/app/posts')
.orderByChild('material')
.equalTo(materialName)
.once('value', function (snapshot) {
snapshot.forEach(function(child) {
child.ref.update({material: false});
});
});