I have a collection with the field called "contact_id". In my collection I have duplicate records with this key.
How can I remove duplicates, resulting in only one record? Already tried:
db.Person Duplicate.ensureIndex ({ "contact_id": 1}, {únicas: verdadeiro, dropDups: true})
But it did not work because the dropDups function is no longer available in MongoDB 3.x
I'm using 3.2