title: How to check wether or not a value is contained in an array when the value type is ObjectId?
body: <p>I fetch an array that is stored in mongoose with ObjectIds. After I output this array through the console I get the following output:</p>
  
  <blockquote>
    <p>["5a5f7199105cc908e874d74b","5a5f9199105cc908e874d74b"]</p>
  </blockquote>
  
  <p>At the same time fetch a different object from mongoose. If I output the ObjectId of this object through the console (object.id) I get the following output:</p>
  
  <blockquote>
    <p>5a5f7199105cc908e874d74b</p>
  </blockquote>
  
  <p>I try to check whether the value is contained in the array or not. My code looks like this: </p>
  
  <blockquote>
    <p>myArray.includes(myObject.id)</p>
  </blockquote>
  
  <p>and I expect to have the result of true. Unfortunately, I get false as a result even though The value is in the array. Maybe it has to deal with the OBject Type? I really do not know how to solve this. Thanks.</p>