title: Increment a value in a nested object?
body: <p>I am messing around with mongodb and node.js this weekend and I'm having some trouble getting through the mongodb docs regarding updating nested objects/documents.</p>
  
  <p>I have a collection in which the documents look like this..</p>
  
  <pre><code>{
   gameName: "string",
   slug: "string",
   players: [{playerName, playerScore}, ...]
  }
  </code></pre>
  
  <p>I'm trying to find out how to increment the value of playerScore based on the playerName.</p>
  
  <p>I suppose this mostly comes down to me not understanding NoSQL method. I even have second thoughts about using an array for the players, so any input would be appreciated.</p>
  
  <p>Thanks!</p>