I want to update a collection like this,
Books.update({_id:bookid},{$set:{‘string.index.weight’:weight}}); / / index is a chaning variable
but it didn’t work, then I try this,
var string=‘bookitems.’+index+’.weight’; / / index is a chaning variable
Books.update({_id:bookid},{$set:{string:weight}});
it is still not work.