title: MongoDB WriteError "code" : 9
body: <p>I am trying to delete some records from MongoDB that have dirty values, but whenever I try to delete it, I am getting the <strong>writeError</strong> with <strong>code 9</strong>.</p>
  
  <p>A sample of the dirty document is as follows:</p>
  
  <pre><code>{
      "_id" : "some_unique_id_abcd",
      "tmp" : "1415772407377",
      "hiv" : "0.0",
      "liv" : "0.0",
      "oindx" : "0.0"
  }
  </code></pre>
  
  <p>The  remove command executed is as follows:</p>
  
  <pre><code>db.myCollection.remove({"_id" : "some_unique_id_abcd"});
  </code></pre>
  
  <p>The following error is thrown</p>
  
  <pre><code>WriteResult({
      "writeError" : {
          "code" : 9,
          "errmsg" : "wrong type for 'delete' field, expected string, 
                      found delete: 0.0"
      }
  })
  </code></pre>
  
  <p>Any idea what exactly this error is about or how to get around it?</p>