title: MongoDB: How to Delete Entry If a Field Contains an Array
body: <p>I have a javascript app that is uploading data to a MongoDB. I had a bug in my code which caused database entries to contain all previous entries plus the new one. </p>
  
  <p>For Example I have this invalid entry:</p>
  
  <pre><code>"created":["4/6/2018 10:45:49 AM","4/6/2018 10:51:07 AM","4/6/2018 10:55:16 AM","4/6/2018 10:56:41 AM"]
  </code></pre>
  
  <p>I would like to go through the database entries and remove all entries where the filed contains an array. I want to remove the entire entry, not just the field as any entry with more than one value is invalid.  </p>
  
  <p>Keep this: </p>
  
  <pre><code>{"created":"4/6/2018 10:45:49 AM"}
  </code></pre>
  
  <p>Remove this:</p>
  
  <pre><code>{"created":["4/6/2018 10:45:49 AM","4/6/2018 10:51:07 AM","4/6/2018 10:55:16 AM","4/6/2018 10:56:41 AM"]}
  </code></pre>
  
  <p>Thanks!</p>