I am using Firebase for this app. Under each documents of a user, I have this array roles
. For normal users, their roles
would just be user
. For an admin, it would be user
and admin
. I want to retrieve all of the normal users. However, the problem is that if I'll set it like this:
.collection("users")
.where("roles", "!=", "admin")
this will still show the user with an admin
role.
How can I retrieve only those normal users and not the user with an admin
role?