I have a method to find a document in my database based on its ObjectID:
console.log(\'id: \' + id + \' type: \' + typeof id); collection.findOne
Yeah, I just spent thirty minutes baffled by this. If anyone finds themselves here, first check if you even need to convert to ObjectID in the first place. Like OP, I forgot that the hexstring is logged as just that - a hexstring.