title: $match query problem using aggregation with mongodb
body: <p>I am trying to do a very simple query joining two collections using aggregation.</p>
  
  <p>I have two collections, </p>
  
  <pre><code>productSchema = new Schema({
      product: { type: String },
      price: { type: Number},
  })
  
  const inventoriesSchema= new Schema({
      date: { type: Date},
      products: [productSchema],
  })
  </code></pre>
  
  <p>Now i want to bring all the products and inside of every product i want to bring the inventory.</p>
  
  <p>This is what i am doing.</p>
  
  <pre><code>    productModel.aggregate([
          {
              $lookup: {
                  from: 'inventories',
                  let: {
                      'product': { $toString: '$_id' }
                  },
                  pipeline: [
                      {
                          $match: {
                              'products._id': '$$product'
                          }
                      },
                  ],
                  as: 'inventory',
              }
          },
        ])
  </code></pre>
  
  <p>i tried a lot of ways... with $toObjectId $toString... using $expr also like this...</p>
  
  <pre><code>                     {
                          $match: {                              
                              $expr: {
                                  $and: [
                                      { $eq: ['$product._id', { $toString: "$$product" }] }
                                  ]
  
                              }
                          }
                      }
  </code></pre>
  
  <p>What i am doing wrong... ???</p>