MongoDB — How to Compare ObjectIds in Node.js
MongoDB requires each document to contain an _id field. If the _id field is not present when inserting a document, MongoDB generates an ObjectId for you. ObjectIds have a length of 12 bytes: 4-byte timestamp, 5-byte random value, and 3-byte incrementing counter. An ObjectId can be formatted as a hex …
Continue Reading