title: How to perform mongoose aggregate operation in nestjs/mongoose?
body: <p>I would like to perform an aggregate operation on mongoose subdocuments using nestjs/mongoose. But I couldn't find any resources on the internet on how to do that. For example:</p>
  <pre><code>{
    username: 'xyz',
    addresses: [
     {address: '1 street'},
     {address: '2 street'}
    ]
  }
  
  UserDoc.aggregate([
  {$match: {username: 'xyz'}},
  {$unwind: $addresses}
  ])
  </code></pre>