So, I needed to update a value of every document in a collection. {"_id": **, "status": "SOLD"}
{"_id": **, "status": "SOLD"} I need those to be {"_id": **, "status": "INACTIVE"}
{"_id": **, "status": "INACTIVE"} How? The answer should be updateMany try {
db.COLLECTION.updateMany(
{status: "SOLD"},
{$set: {current_value: "INACTIVE"}}
);
} catch (e) {
print(e);
}