title: How to use variable as Object Key
body: <p>In this function I pass in an ID variable and a name variable, I use the ID to pick out the correct table and want to set an array using the value inside of the <code>name</code> variable. Currently It's adding just "name" as an object key, how can I tell it to use the value inside of my name variable as the Object Key?</p>
  
  <pre><code>function addnewuser(name, id){ // add users
            console.log(id);
            db.collection('newcon').update({_id: id}, {"$set": { name: [] }});
            ret(id);
          }
  </code></pre>