What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-12 09:24:02
compare two arrays and remove not matched objects
If you're looping over array1 with i = 0, len = array1.length; i < len; i++, but within the loop you remove an entry from array1 what do you think happens on the next loop? You also appear to be removing things that are found, but your question say yo... Add solution -
TypeScript 2021-08-28 07:44:01
filter duplicate using map and filter in typescript
var arrOfObj = [ { id:1 ,name:'abc',age:27 }, { id:2 ,name:'pqr',age:27 }, { id:1 ,name:'abc',age:27 }, ] var setObj = new Set(); // create key value pair from array of array var result = arrOfObj.reduce((acc,item)=>{ if(!s... Add solution