title: How to ignore duplicate "_id" and insert unique "_id" in mongodb
body: <p>I have a JSON structure at first insertion as</p>
  
  <pre><code>collection.insert(query.query, function(err, docs) {
                  callback(err,docs);
                  dbCon.close();
              });
  </code></pre>
  
  <p>JSON Structure:</p>
  
  <pre><code>"employees":[
      {"_id":1, "lastName":"Doe"}, 
      {"_id":2, "lastName":"Smith"}, 
      {"_id":3,"lastName":"Jones"}
  ]
  </code></pre>
  
  <p>When I first insert this JSON into mongodb, it gets inserted without any errors.
  When I try insert again on the same database, with below JSON</p>
  
  <pre><code>"employees":[
      {"_id":2, "lastName":"Smith"}, 
      {"_id":5, "lastName":"Peter"}, 
      {"_id":6,"``lastName":"James"}
  ]
  </code></pre>
  
  <p>Now the mondo db is throwing duplicate key error.
  Is there any way where I can omit the "_id":2 and insert "_id":5 and "_id":6 into mongo?</p>
  
  <p>Please help me..</p>