title: Get get unique ObjectID's from an array containing duplicates
body: <p>So I have an array of ObjectID's, for example:</p>
  
  <pre><code>console.log(objectIdArray);
  </code></pre>
  
  <p>gives <code>[ObjectID, ObjectID, ObjectID]</code>.</p>
  
  <p>However there are duplicates here, as seen when mapping to ID strings:</p>
  
  <pre><code>var idArray = objectIdArray.map(objectId =&gt; objectId.toString());
  console.log(idArray);
  </code></pre>
  
  <p>gives <code>["5afa54e5516c5b57c0d43227", "5afa54e5516c5b57c0d43227", "5afa54f0516c5b57c0d43228"]</code> where you can see the ID ending in <strong>27</strong> is duplicated twice.</p>
  
  <p>How can I filter this array of ObjectID's to remove the duplicates (keeping the complete <strong>ObjectID</strong> objects, not just the ID string values)?</p>