title: push to mongodb array using dynamic key
body: <p>I'm trying to push a data by dynamic key</p>
  
  <p>db structure:</p>
  
  <pre><code>{
      "obj1":{
        "array":[
         {
          "field1":"text1"
         },
         {
          "field2":"text2"
         }
        ]
      },
      "id":123;
   },
   {
      "obj2":{
        "array":[
         {
          "field1":"text1"
         },
         {
          "field2":"text2"
         }
        ]
      },
      "id":1234;
   }
  </code></pre>
  
  <p>I'm trying to use variable as a key in map path:</p>
  
  <pre><code>var a = 'obj2';
  db.collection('fooCollection').update({'id':1234},{$push:{a.array:{  "field3":"text3"}}});
  </code></pre>
  
  <p>if I do:</p>
  
  <pre><code>db.collection('fooCollection').update({'id':1234},{$push:{"obj2.array":{ "field3":"text3"}}});
  </code></pre>
  
  <p>it works, but I badly need to use dynamic key.</p>