title: Updating a specific element in an array with MongoDB / Meteor
body: <pre><code>"users_voted" : [ 
      {
          "user_id" : "AQG8ECLdBRJ4jwPMG",
          "score" : "down"
      }
  ]
  </code></pre>
  
  <p>Wondering how I would go about updating the <code>users_voted</code> field which is an array objects. I need to have a specific object updated. I know the <code>index</code> at which this object is located, I simply need to figure out how I can update that object in a MongoDB / Meteor collection.</p>
  
  <p>This is some pseudo-code that I have to better explain what I mean. </p>
  
  <p><code>Posts.update({_id: post_id}, {$set: {vote_score[index]: u_object}});</code></p>
  
  <p>So in this query I know <code>index</code> and <code>post_id</code> as well as <code>u_object</code> is the object that I am trying to put into the array in place of whatever object that was there at that <code>index</code>. If someone could help let me know how I should go about this, it would be great. </p>