I have several documents in Firestore, each of which contain a map of user IDs. For example:
// Document 1
userIds: {
"1": true,
"2": true,
"3": true,
...
}
// Document 2
userIds: {
"2": true,
"3": true,
...
}
// Document 3
userIds: {
"2": true,
"3": true,
"4": true,
...
}
I would like to find all documents whose userIds
map do not contain a certain user ID. I've tried using this query:
.where('userIds.1', isEqualTo: null)
However this doesn't get the intended result. With the above query, all documents are returned. Documents 2 and 3 should instead be returned.
How can I achieve this?