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 Realm function

To work with ObjectID in Realm function, use the syntax new BSON.ObjectId("<ObjectId bytes>") as specified in the documentation. See the example below:


Did this answer your question?