What i am doing is -
db.getCollection('campaigns').update(
{'_id' : ObjectId("57aea88f2f1321710f7373f8")},
{ $set : {
_a : 'this._a' + 1000
}
}
);
I tried this also :
db.getCollection('campaigns').update(
{'_id' : ObjectId("57aea88f2f1321710f7373f8")},
{ $set : {
_a : this._a + 1000
}
}
);
What i am getting is _a = nan.
Please help me in this. I am very new to MongoDb. What I need is add value in _a field with 1000.