it might look like a duplicate question but actually it is not.
I have a mongoDB database with some French towns in it (omelette du fromage), but the file from which I got those seems to have duplicate. At first I use this method to remove towns with the same name and it works just fine but then I learn some French towns localised in different parts of the country has the same name.
As they have zipCode we can legitimaly think about make the same operation on zipcodes, but zipcodes can be the same for two different cities. Kinda crooked. So I would like to use the same command but instead of only watching one property (the town's name or the zipcode), I would like to look at both of them. I am not that familiar with mongoDB and I'm using robomongo.
If anyone would be able to help me find out the solution and/or explain me how the first method works so I can get more in touch with mongo :) that would be awesome
EDIT:
It is not a duplicate of Remove duplicate in MongoDB (and if you pay attention you will see I even link this topic when I first asked my question). It was just a problem with the use in $group in mongoDB with two properties in order to achieve a former
db.pages.ensureIndex( { ville:1, codePost:1 }, { unique:true, dropDups:true } )