title: Mongodb aggregate $lookup $project and $match do not work
body: <p>I need your help. I am practicing very simple join method with filter on my two collection. It works without filter.
  My mongodb query is mention below.</p>
  
  <p><strong>Two Collection</strong></p>
  
  <p>First collection</p>
  
  <pre><code>{
      "_id": ObjectId("5ea18cd00715f152a6fcee24"),
      "company_name": "COMPANY 1",
      "company_detail_id": [
              {
                  "_id": ObjectId("5e5db61dbb9d1523f7d78e65") //NOTE: company_detail_id == programs._id
              }
      ],
      "is_deleted": false,
  }
  </code></pre>
  
  <p>Second Collection</p>
  
  <pre><code>{
       "_id": ObjectId("5e5db61dbb9d1523f7d78e65"),
       "name": "PROGRAM 1",
       "is_deleted": false
  }
  </code></pre>
  
  <p><strong>Query</strong></p>
  
  <blockquote>
  <pre><code>var list = await dataModel.aggregate([
              {
                  $lookup: {
                      from: "company_details",
                      localField: "company_detail_id._id",
                      foreignField: "_id",
                      as: "programs"
                  }
              },
              {
                  "$project": {
                              "_id": true,
                              "company_name": true,
                              "company_detail_id": true,
                              "is_deleted": true,
                              "programs._id": true,
                              "programs.name": true,
                              "programs.is_deleted": true
                          }
              },
              {
                  "$match": {
                              "_id": "5ea18cd00715f152a6fcee24",
                              "is_deleted":false
                              }
              }
          ]).skip(0).limit(10);
  </code></pre>
  </blockquote>
  
  <p><strong>Issue</strong></p>
  
  <p>This query WORKS when</p>
  
  <pre><code>    "$match" : {} 
      or
      "$match" : { "company_name": "xyz" } 
  </code></pre>
  
  <p>This query <strong>NOT WORKING</strong> when</p>
  
  <pre><code>    "$match" : { "_id" : "5ea18cd00715f152a6fcee24" } 
      or
      "$match" : { "_id": "5ea18cd00715f152a6fcee24", "is_deleted":false } 
  </code></pre>
  
  <p><strong>Expected Result</strong></p>
  
  <pre><code>{
      "_id": "5ea18cd00715f152a6fcee24",
      "company_name": "COMPANY 1",
      "company_detail_id": [
              {
                  "_id": "5e5db61dbb9d1523f7d78e65" //NOTE: company_detail_id == programs._id
              }
      ],
      "is_deleted": false,
      "programs": [
              {
                   "_id": "5e5db61dbb9d1523f7d78e65",
                   "name": "PROGRAM 1",
                   "is_deleted": false
              }
      ]
  }
  </code></pre>