title: How to delete specific fields in a mongoDb via mongoose
body: <p>I'm trying to delete only specific fields in my mongoDb user document but i don't think using the <code>userModel.deleteOne({_id:id})</code> would not suffice as this would delete the entire document which isn't what i want.</p>
  <pre><code>{
      &quot;_id&quot;: &quot;12345678&quot; ,
      &quot;dob&quot;: null,
      &quot;createdAt&quot;:  &quot;2021-09-16T09:11:55.199Z&quot; ,
      &quot;email&quot;: &quot;287983@gmail.com&quot;,
      &quot;firstName&quot;: &quot;iam1234&quot;,
      &quot;lastName&quot;: &quot;test14&quot;,
      &quot;webisite&quot;: &quot;hello-world.com&quot;,
      &quot;uid&quot;: &quot;SKkZZ3a&quot;,
      &quot;skills&quot;: []
  }
  </code></pre>
  <p>in this context, I want to delete <code>firstName, lastName email website skills dob</code>. Leaving me with just <code>_id and uid</code></p>