here is a link to my code https://codesandbox.io/s/strange-bash-0n1bf?file=/src/components/TagEditor.vue I have created a tag input with vue js here I am adding new item by input entry I want to prevent duplicate tag name
addTag (name) {
    if ( this.tags.length < 6 )  {
      this.tags.push({
      id: String(Math.floor(Math.random() * 9)),
      name,
      })
      this.name = ""
    }
  },
hope someone could help me with it
 
    