Why must Objectid be used to delete documents according to ID?
Although what you see seems to be a string, the _id of document is actually an ObjectId object, so you must use the
ObjectId()
The method converts a string into an object to use
Why must Objectid be used to delete documents according to ID?
Although what you see seems to be a string, the _id of document is actually an ObjectId object, so you must use the
ObjectId()
The method converts a string into an object to use