arrays

 

// remove same data from two arrays
const array1 = this.Productsforcompare;
const array2 = this.Productsnewcompare2;
const array3 = array1.filter(entry1 => !array2.some(entry2 => entry1.ProductID === entry2.ProductId));
console.log(array3);
// end remove same data from two arrays // remove single id based remove data from array
const items = JSON.parse(localStorage.getItem('outbounddatasavedlocal'));
const filtered = items.filter(item => item.OutboundId !== this.removeouterid);
localStorage.setItem('outbounddatasavedlocal', JSON.stringify(filtered));

Comments

Popular posts from this blog

Your app currently targets API level 27 and must target at least API level 28 to ensure it is built on the latest APIs optimized for security and performance. Change your app's target API level to at least 28

ionic project creation

change root user in ubuntu