title: Projection of arrays using $ vs using $slice
body: <p>I have a collection as follows:-</p>
  
  <pre><code>{ "_id" : 1, "grades" : [ 70, 87, 90 ] }
  { "_id" : 2, "grades" : [ 90, 88, 92 ] }
  </code></pre>
  
  <p>I am using following query:-</p>
  
  <pre><code>db.students.find( { semester: 1, grades: { $gte: 85 } },
                    { "grades.$": 1 } )
  </code></pre>
  
  <p>I am getting result as:-</p>
  
  <pre><code>{ "_id" : 1, "grades" : [ 87 ] }
  { "_id" : 2, "grades" : [ 90 ] }
  </code></pre>
  
  <p>Now my question is that when i use $gte on fields grades, It will check if any element of array matches condition and if it does it return the document. So why am i getting output of first document as 87 and not 70. I know that we have specified an equality condition "grades: { $gte: 85 }" but it has returned me the complete document and projected the first field. Then why 87 is the output?</p>