How to Update Multiple Array Elements in mongodb
I have a Mongo document which holds an array of elements. I’d like to reset the .handled attribute of all objects in the array where .profile = XX. The document is in the following form: { “_id”: ObjectId(“4d2d8deff4e6c1d71fc29a07”), “user_id”: “714638ba-2e08-2168-2b99-00002f3d43c0”, “events”: [{ “handled”: 1, “profile”: 10, “data”: “…..” } { “handled”: 1, “profile”: 10, “data”: … Read more