I'm trying to update some documents in mongodb, basically what I want is to multiply by 2 some property, how can I achieve that?
This is what I tried running:
db.getCollection('myCollection').update({kId:"house"},
{$set:
{
Count: NumberInt(Count*2) <-- this is illegal
}
},{multi:true}
)
Can anyone tell me how to do that properly?
Thanks!