When choosing multiple ion-items from a list, I am looking to eliminate identical items from an array.
HTML Code
<div class="ion-item optionalItem">
<button class="ion-button" ion-item *ngFor="let configop of interiorOption" (click)="itemSelected(configop)">
<span class="color-name">{{ configop.intName }}</span>
<span class="color-price">{{ configop.price }}</span>
</button>
</div>
TypeScript Code
this.Array.push(configop);
for (let key in this.Array) {
this.Array2.push(this.Array[key])
}
for(let i = 0; i < this.Array.length; i++) {
if(this.Array[i] === this.Array2[i])
{
this.Array.pop();
}
console.log("Sorted",this.Array);
}