Converts a value to an ObjectId(). If the value cannot be converted to an ObjectId, $toObjectId errors. If the value is null or missing, $toObjectId returns null.
4.0
https://www.mongodb.com/docs/manual/reference/operator/aggregation/toObjectId/#mongodb-expression-exp.-toObjectId
Generated using TypeDoc
Converts a value to an ObjectId(). If the value cannot be converted to an ObjectId, $toObjectId errors. If the value is null or missing, $toObjectId returns null.