title: How do you find and remove a Mongoose subdocument within an array by its id?
body: <p>I have the following mongoose schema:</p>
  
  <pre><code>{
      name: String,
      subArray: [
          {
              subName: String,
              subNumber: Number
          }
      ]
  }
  </code></pre>
  
  <p>I've added objects to the subArray, which get automatically assigned an <code>"_id"</code>. In Node.js, how do I find an object by <code>"_id"</code> within the subArray and remove it?</p>