I have a simple document in momgo with name User. In this document i have a field(userRoles), which contains user roles, it's array(like ["ADMIN", "SUPER_ADMIN", "USER"]).
I'm using mongo compas, and I have created simple request with filter to find some users:
db.getCollection('user').find({userRoles: {$elemMatch: {$in: ["ADMIN", "SUPER_ADMIN"]}}})
How can I do it on Java?
Comments
Post a Comment