I have around 30 records in collection todos
, almost 25 of them contains the word work
. Now when I am trying to use array-contains
it doesn't return anything.
Here is my query code:
firebase.firestore().collection("todos")
.where('Workdesc', 'array-contains', 'work')
.get()
.then(querySnapshot => {
querySnapshot.forEach(function(doc) {
// doc.data() is never undefined for query doc snapshots
console.log(doc.id, " ===> ", doc.data());
});
});
Here is my Firestore screenshot:
Query seems as per docs, but why is it not returning anything?