title: how to make mongodb lookup match from both collection
body: <p>Database structure:</p>
  
  <pre><code>db={
    "collection": [
      {
        "key": 15,
        "name": "srk",
  
      },
      {
        "key": 12,
        "name": "suman",
  
      }
    ],
    "other": [
      {
        "key": 15,
        "name": "miki",
        "category": "dish"
      },
      {
        "key": 15,
        "name": "mira",
        "category": "air"
      },
      {
        "key": 15,
        "name": "manas",
        "category": "air"
      },
      {
        "key": 166,
        "name": "sibu",
        "category": "dish"
      }
    ]
  }
  </code></pre>
  
  <p>query i am trying:</p>
  
  <pre><code>  db.collection.aggregate([
        {
          $lookup: {
            from: "other",
            localField: "key",
            foreignField: "key",
            as: "inventory_docs"
          }
        },
        {
          $match: {
            key: 15,
            { "inventory_docs":
              { category: 'dish'}
            }
          }
        }
      ])
  </code></pre>
  
  <p>I am not getting result here while making query in mongodb.</p>
  
  <p>Please have a look , tell me where i am doing wrong in the query.</p>
  
  <p>I am matching key with 15 from both the collections  and category with 'Dish' from foreign collection</p>