Answers for "remove duplicates from two array of objects in javascript"

-1

remove duplicates from array of objects javascript

let arr = [{name: "john"}, {name: "jane"}, {name: "imelda"}, {name: "john"}];

const uniqueArray = arr.filter((v,i,a)=>a.findIndex(t=>(t.name===v.name))===i)
console.log(uniqueArray);
Posted by: Guest on June-21-2021

Code answers related to "remove duplicates from two array of objects in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language