FastFoodCoding

Login


Connect with one of the following accounts





Login

Please wait while we redirect...

Views: 362 Ask New Question


On By


1 Answer


Use the following to increment a field value by one.

db.getCollection('posts').update({ "_id" : ObjectId("document_id") } , {   $inc: {  views : 1 } }, {upsert: true} )
On By


Answer This Question


Top Tutorials

Top Questions

Top Articles

Top Blogs

Top News