title: multiple conditions in $match in mongodb
body: <p>I have a collection AccountSupport. I has array of supports property. I want to filter the record on parent property and a property of an array</p>
  
  <pre><code>db = {
    "AccountSupport": [
      {
      "_id" : ObjectId("5e9c6170b38c373530c5b00a"),
      "accountName" : "domestic",
      "supports" : [ 
          {
              "subject" : "Traverse",
              "desc" : "Travers support consolidation",
          }, 
          {
              "subject" : "Non Traverse",
              "desc" : "Non Travers support consolidation",
          },
          {
              "subject" : "Domestic Traverse",
              "desc" : "Domestic Travers support consolidation",
          }       
      ],
  
    }
  </code></pre>
  
  <p>I want to filter on accountName and supports.subject.</p>
  
  <p><strong>Below is my query</strong></p>
  
  <pre><code>db.AccountSupport.aggregate([
    {
      "$match": {
        "$and": [
          {
            "supports.subject": "Traverse"
          },
          {
            "accountName": "domestic"
          }
        ]
      }
    },
    {
      "$unwind": "$supports"
    },
    {
      "$project": {
        "SupportName": "$supports.subject",
        "desc": "$supports.desc"
      }
    }
  ])
  </code></pre>
  
  <p>The above query returns me all the supports of a particular accountName whereas i only want the single object of the matched subject.  Is above the simplest approach to do it?</p>
  
  <p><strong>MongoPlayGround</strong></p>
  
  <p><a href="https://mongoplayground.net/p/mQVFStpnoem" rel="nofollow noreferrer">MongoPlayGround for my query</a></p>