title: Updating an array of objects with a new key in mongoDB
body: <p>Similar to this <a href="https://stackoverflow.com/questions/9209670/mongo-push-to-array-inside-array">question</a>  </p>
  
  <p>Barrowing the data set, I have something similar to this:  </p>
  
  <pre><code>{
      'user_id':'{1231mjnD-32JIjn-3213}',
      'name':'John',
      'campaigns':
          [
              {
                  'campaign_id':3221,
                  'start_date':'12-01-2012',
              },
              {
                  'campaign_id':3222,
                  'start_date':'13-01-2012',
              }
          ]
  }
  </code></pre>
  
  <p>And I want to add a new key in the <code>campaigns</code> like so:  </p>
  
  <pre><code>{
      'user_id':'{1231mjnD-32JIjn-3213}',
      'name':'John',
      'campaigns':
          [
              {
                  'campaign_id':3221,
                  'start_date':'12-01-2012',
                  'worker_id': '00000'
              },
              {
                  'campaign_id':3222,
                  'start_date':'13-01-2012',
                  'worker_id': '00000'
              }
          ]
  }
  </code></pre>
  
  <p>How to <code>insert/update</code> a new key into an array of objects?<br>
  I want to add a new key into every object inside the array with a default value of <code>00000</code>.  </p>
  
  <p>I have tried:<br>
   <code>db.test.update({}, {$set: {'campaigns.worker_id': 00000}}, true, true)</code><br>
   <code>db.test.update({}, {$set: {campaigns: {worker_id': 00000}}}, true, true)</code>  </p>
  
  <p>Any suggestions?</p>