title: Remove by _id in MongoDB console
body: <p>In the MongoDB console how can I remove a record by id? Here's my collection :</p>
  
  <pre><code>[ 
    {
       "_id" : { "$oid" : "4d512b45cc9374271b02ec4f" },
       "name" : "Gazza"
    },
    {
       "_id" : { "$oid" : "4d513345cc9374271b02ec6c" },
       "name" : "Dave",
       "adminOf" : { },
       "email" : "email@email.com"
    }
  ]
  </code></pre>
  
  <p>And here are the commands I've tried that don't work :</p>
  
  <pre><code>db.test_users.remove( {"_id":{"$oid":new ObjectId("4d512b45cc9374271b02ec4f")}});
  db.test_users.remove( {"_id":{"$oid":"4d513345cc9374271b02ec6c"}});
  db.test_users.remove( {"_id":"4d512b45cc9374271b02ec4f"});
  db.test_users.remove( {"_id":new ObjectId("4d512b45cc9374271b02ec4f")});
  </code></pre>
  
  <p>Removing by name works :</p>
  
  <pre><code>db.test_users.remove( {"name":"Gazza"});
  </code></pre>
  
  <p>This is in the browser shell on at <a href="http://mongodb.org">mongodb.org</a> if that makes any difference</p>
  
  <p>Thanks</p>