In the MongoDB console how can I remove a record by id? Here\'s my collection :
[ { \"_id\" : { \"$oid\" : \"4d512b45cc9374271b02ec4f\" }, \"nam
I've just bumped into this myself and this variation worked for me:
db.foo.remove({**_id**: new ObjectId("4f872685a64eed5a980ca536")})