If i have a mongodb collection named Posts with document like following:
{
_id: 11111,
time:40
}
how can i add numeric value to the value 'time' on the fly using .update method? resulting with the following:
{
_id: 11111,
time:50
}
I was hoping something like:
Posts.update(this._id, {
$set: {time:{time+10}}
});
which don't seem to work. Is this even possible? any ideas?