0

I don't want to see the same value repeated in mongodb collection ,if I tried to keep it same value, mongodb will not allow that collection. for eg, i have a collection:

{
_id:<Id of that collection>
name:"John:"
}

If i tried to keep again "John" as the name in mongodb collection using Mongoose,then it should not allow to push the collection to mongodb .so i dont want to duplicate it. please help me guys, iam trying this for 3 days.

0 Answers0