MongoDB update field value as ObjectId

workaround:

{ "$expr": { "$eq": ["$_id", { "$toObjectId": "<object-id>" }] } }
2 Likes