Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mongodb add 1 to field

db.products.update(
   { $inc: { quantity: -2, "metrics.orders": 1 } }
)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mongodb #add #field
ADD COMMENT
Topic
Name
7+5 =