I have been searching, and I find it rather complicated to get this done, how do I find all documents where the field = “yes” ? Is the result shown in a array of documents?
ps. I find it strange that I can’t use the db.collection.find({active: yes}).then(result=>{ console.log(result); });
So, I cannot use a promise there, I am confused… how do I get these results?
I want to update all fields on a function with a timer, so that e.g. every 5 seconds it decreases 5000…
So every 5 seconds it queries and verifies the fields…
(its a timer function)
heelp