Closed armandomendivil closed 8 years ago
If i have a list of users, how i can get all roles from users as Meteor.user().roles()
Meteor.user().roles()
example: users[0].roles() ["employer"] users[1].roles() []
users[0].roles()
["employer"]
users[1].roles()
[]
Check the pluck and union methods of underscore.
_.union.apply(this, _.pluck(users, 'roles'));
If i have a list of users, how i can get all roles from users as
Meteor.user().roles()
example:
users[0].roles()
["employer"]
users[1].roles()
[]