S
S
Stopy2015-04-27 00:10:12
MongoDB
Stopy, 2015-04-27 00:10:12

How to create a query with decrement?

I know how to make an increment through db.collection.findAndModify(), but what if I need to make a DECrement? As I understand there are no solutions from the "box" ?! How to solve my problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Timur Shemsedinov, 2015-04-27
@Stopy

Do an increment by -1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question