title: MongoDB projection query, filter field in matching element of inner array
body: <p>I have a document that contains an array. Like so:</p>
  
  <pre class="lang-js prettyprint-override"><code>"_id" : ObjectId("55101f81e4b07caf8554b9b1"),
  "myId" : "1222222",
  "isDelayed" : false,
  "status" : "BALLS",
  "yellow" : false,
  "white" : true,
  "people" : [ 
      {
          "peopleId" : 222222,
          "bc" : 0,
          "status" : "live",
          "fc" : 1,
          "tc": 4,
          "rc": "yellow" 
  
      }, 
      {
          "peopleId" : 33312,
          "bc" : 0,
          "status" : "live",
          "fc" : 1,
          "tc": 4,
          "rc": "yellow" 
  
      }, 
    ...
  </code></pre>
  
  <p>I have a mongo query like below, in the collection <code>mycoll</code>, if <code>myId=1.222</code> and in the people array if <code>people.peopleId=1123</code> it returns the first match:</p>
  
  <pre class="lang-js prettyprint-override"><code>db.getCollection('mycoll').find(
      {myId:'1.222',
          people: { $elemMatch: { peopleId: 1123 }
                   }
      },{"people.$": 1 }).pretty();
  </code></pre>
  
  <p>The result includes all fields in the people entry from the array:</p>
  
  <pre class="lang-js prettyprint-override"><code>"people" : [ 
          {
              "peopleId" : 1122,
              "bc" : 0,
              "status" : "live",
              "fc" : 1,
              "tc": 4,
              "rc": "yellow" 
  
          }, 
  </code></pre>
  
  <p>How do I filter the reply that it only returns the desired field from the <strong>matching</strong> entry in the inner array, say <code>"status"</code>? I can generate a filter for the outer document but not a field in an array element.</p>