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 name
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?
function addnewuser(name, id){ // add users
console.log(id);
db.collection('newcon').update({_id: id}, {"$set": { name: [] }});
ret(id);
}