ObjectId in the Date Explorer of Atlas UI
To work with ObjectId in the Date Explorer of Atlas UI, use the syntax {"$oid": "<ObjectId bytes>"} as specified in the documentation. See the example below:
ObjectId in the Date Explorer of Mongo shell and Compass
To work with ObjectID in Mongo Shell and Compass, use the syntax ObjectId("<ObjectId bytes>"). See the example below:
ObjectId in an App Services function
To work with ObjectID in an App Services function, use the syntax new BSON.ObjectId("<ObjectId bytes>") as specified in the documentation. See the example below:
โ