title: Update all sub-documents inside document mongodb
body: <p>I want something like this</p>
  
  <pre class="lang-js prettyprint-override"><code>db.students.update( 
      { "_id": 4, "grades.grade": 85 }, 
      { 
          "$set": { "grades.$.std" : 6 } 
      } 
  )
  </code></pre>
  
  <p>But I want to update all "grades" not just the first one, like the <a href="http://docs.mongodb.org/manual/reference/operator/update/positional/#up._S_" rel="nofollow">$ explain</a></p>
  
  <p>when I tried it just update the first one. any ideas about to update the entire list?</p>