title: Add new field to all documents in a nested array
body: <p>I have a database of person documents. Each has a field named photos, which is an array of photo documents. I would like to add a new 'reviewed' flag to each of the photo documents and initialize it to false.</p>
  
  <p>This is the query I am trying to use:</p>
  
  <pre><code>db.person.update({ "_id" : { $exists : true } }, {$set : {photos.reviewed : false} }, false, true)
  </code></pre>
  
  <p>However I get the following error:</p>
  
  <pre><code>SyntaxError: missing : after property id (shell):1
  </code></pre>
  
  <p>Is this possible, and if so, what am I doing wrong in my update?</p>
  
  <p>Here is a full example of the 'person' document:</p>
  
  <pre><code>{
  "_class" : "com.foo.Person",
  "_id" : "2894",
  "name" : "Pixel Spacebag",
  "photos" : [
      {
          "_id" : null,
          "thumbUrl" : "http://site.com/a_s.jpg",
          "fullUrl" : "http://site.com/a.jpg"
      },
      {
          "_id" : null,
          "thumbUrl" : "http://site.com/b_s.jpg",
          "fullUrl" : "http://site.com/b.jpg"
      }]
  }
  </code></pre>
  
  <p>Bonus karma for anyone who can tell me a cleaner why to update "all documents" without using the query <code>{ "_id" : { $exists : true } }</code></p>