I have two different object
- User 
- UserGroup 
User
{
          _id:1,
          Name:'name',
          Usergroup:
      [
                        {
                                '$ref' : 'UserGroup',
                                '$id' : 1
                         },
                         {
                                '$ref' : 'UserGroup',
                                '$id' : 2
                        }]
 }
UserGroup
{
                         _id:1,
                          name: 'admin'
                  },{
                        _id:2,
                         name: 'admin1'
 }
I need to get usergroup collection along with list of users can anyone help me on writing join query please.
 
    