I would like to indicate in my code an attribute for installing / updating in updating the database dynamically. Something like that:
var fieldname = "firstname" var name = "loomi" Meteor.users.update({_id:Meteor.user()._id}, {$set:{"profile."+fieldname: name}})
(profile [file_name] does not work.)
The result above should be the same:
Meteor.users.update({_id:Meteor.user()._id}, {$set:{"profile.firstname": "loomi"}})
How can I do this carefully, please? (Without the whole object doing the manipulation and sending the whole object back.)
loomi source share