I am using Cloud Firestore and within collections,one named "channels" containing the following values ->
users : ["_id1","_id2"]
I have to search in a way to check both the values from users array. I am trying this way but its giving me nothing
db.collections("channels").WhereArrayContains("users", listOf("_id1","_id2")).get()
But the search is not getting the results. Because it seems the query is incorrect. What is the solution for it? please mention the query for it.
Note - WhereField is deprecated in android so I can't use it anymore.
Try
db.collection("channels").WhereArrayContains("users", listOf("_id1","_id2")).get()
- you referenced the db collection in plural and missed the closing quote in the collection name which might be the reason why it didn't work.