Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- username: "fabio",
- password: "xxx",
- roles: [
- {
- rolename: "administrator",
- isVip: true
- },
- {
- rolename: "manager",
- isVip: true
- }
- ]
- },
- {
- username: "marco",
- password: "yyy",
- roles: [
- {
- rolename: "manager",
- isVip: true
- }
- ]
- },
- {
- username: "pippo",
- password: "...",
- roles: [
- {
- rolename: "monkey",
- isVip: false
- }
- ]
- }
- ]
- > db.users.distinct('roles.rolename')
- [ "administrator", "manager", "monkey" ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement