title: SubDocument updates in mongodb using node
body: <p>I have collection structure like this.</p>
  
  <pre><code>application_data: {
    name : A,
    site : B,
    location : [
      { key1 : value1, key2 : value2},
      { key3 : value3, key4 : value4}
    ]
  }
  </code></pre>
  
  <p>Now I want to add a another array to "location" as a sub document so that my location becomes</p>
  
  <pre><code>location : [
    { key1 : value1, key2 : value2},
    { key3 : value3, key4 : value4, key5 :[{subkey1:subvalue1, subkey2:subvalue2}]}
  ]
  </code></pre>
  
  <p>I tried <code>$push</code> &amp; <code>$addToSet</code> which did not help me. Can somebody help me?
  Helpful if you explain an example using nodejs.</p>