title: i want to remove all my duplicates and keep only one duplicate - mongodb
body: <p>I have tons of data in my database. and i have so many duplicates in it. I want to remove all these duplicates and keep only one data from it,</p>
  
  <p>For example i have data like this in my login object</p>
  
  <p><strong>id</strong>        <strong>name</strong></p>
  
  <p>123              abc</p>
  
  <p>124              abc</p>
  
  <p>125              abc</p>
  
  <p>126              abc</p>
  
  <p>127              pqr</p>
  
  <p>128              pqs</p>
  
  <p>i want to keep only one user whose name is 'abc' and remove all the other users whose name is 'abc'
  How can i achieve it in mongodb
  thanks in advance </p>