db.inventory.updateMany( { $or: [ { "size.uom": "in", "size.h": { $gte: 8.75 } }, // Filter for inches { "size.uom": "cm", "size.h": { $gte: 22.225 } } // Filter for centimeters ] }, { $set: { "status": "B" } } // Update to set the status to "B" )