How to user firebase Orderby Wisely

There are number of ways  firebase order by can be used.Ferfer the following example.



 It can be user as a where clause  to select values based on child attribute.You dont need to select items within the for loop.

 todoRef.orderByChild("title").equalTo("test 1").once('value').then(function(snapshot) {
    snapshot.forEach(function(childSnapshot) {
        var todoID=childSnapshot.key;
})
})..

We can use it as fallow,,

Comments

Popular posts from this blog

ENOENT: no such file or directory, rename : node_modules/async

react-quill Integrate quill-image-resize-module