I have a firebase database from which I would like to retrieve all items except the items having a specific value. A function like notEqualTo()
, so to say.
firebase.database()
.ref().child('/snippets/')
.orderByChild('description')
.notEqualTo('dontDisplay')
.on('value',function(snap) {
// Working with the right snapshot
}
This obviously does not work since notEqualTo
is not a function. I also tried passing a function to equalTo
but this doesn't work either:
firebase.database()
.ref().child('/snippets/')
.orderByChild('description')
.equalTo(function (descr) { descr !== 'dontDisplay'; })
.on('value',function(snap) {
// Working with the right snapshot
}
What's the right way to filter on items not having the description 'dontDisplay'?