title: Vue - check if a :key has already been used in v-for
body: <p>I have a <code>v-for</code> that loops through an array of objects using object id's as <code>:keys</code>. I then want to add more objects to that array. The problem is that some of the objects being added might already be present in the array and I only want unique items to be present in the resulting list.</p>
  
  <p>Is there a way to check whether a given <code>:key/id</code> has already been used inside <code>v-for</code> without looping through all the objects in the array? Does Vue maintain a list of keys that can be easily compared against?</p>
  
  <p>Ideally, would want to do something like:</p>
  
  <pre><code>if ($v-for.keys.includes(object.id)) {
      // don't add the object to the array
  } else {
      // add the object to the array
  }
  </code></pre>