use of orderByChild in firebase code example
Example: firebase orderbychild update
database.ref('/app/posts')
.orderByChild('material')
.equalTo(materialName)
.once('value', function (snapshot) {
snapshot.forEach(function(child) {
child.ref.update({material: false});
});
});