I have a collection in MongoDB where there are around (~3 million records). My sample record would look like,
{ \"_id\" = ObjectId(\"50731xxxxxxxxxxxxxxxxxx
While @Stennie's is a valid answer, it is not the only way. Infact the MongoDB manual asks you to be very cautious while doing that. There are two other options