title: Update embedded object inside array inside array in MongoDB
body: <p>I have document like</p>
  
  <pre><code>{
      id : 100,
      heros:[
          {
             nickname : "test",
             spells : [
               {spell_id : 61, level : 1},
               {spell_id : 1, level : 2}
             ]
          }
      ]
  }
  </code></pre>
  
  <p>I can't <code>$set</code> spell's <code>level : 3</code> with <code>spell_id : 1</code> inside <code>spells</code> that inside <code>heros</code> with nickname "test. I tried this query:</p>
  
  <pre><code>db.test.update({"heros.nickname":"test", "heros.spells.spell_id":1}, 
  {$set:{"heros.spells.$.level":3}});
  </code></pre>
  
  <p>Errror i see is </p>
  
  <blockquote>
    <p>can't append to array using string field name [spells]
    Thanks for help.</p>
  </blockquote>