title: duplicate check in array when edit the data in array
body: <p>I push the data into an array. Before pushing, I check name already exists or not.</p>
  <ol>
  <li><p>I checked whether the same name available in the array or not</p>
  </li>
  <li><p>If it exists alert throws &quot; duplicate items&quot;</p>
  </li>
  <li><p>If it is a new item, it will push into an array.</p>
  </li>
  </ol>
  <p>The below code has been working fine till now</p>
  <p>But when I edit the existing item  address field, it will throw the duplicate alert items</p>
  <pre><code>this.arrayData = [{
      &quot;name&quot;: &quot;sachin&quot;,
      &quot;address&quot;: &quot;india&quot;
  }, {
      &quot;name&quot;: &quot;bin&quot;,
      &quot;address&quot;: &quot;us&quot;
  }, {
      &quot;name&quot;: &quot;gill&quot;,
      &quot;address&quot;: &quot;aus&quot;
  }]
  
  var isInArray = this.arrayData.filter(c=&gt;c.name === this.data.name);
  
  if (isInArray.length &gt; 0) {
      alert(&quot;dublicate items&quot;);
  } else {
      this.saveItems(this.data);
  }
  </code></pre>