Answers for "javascript remove duplicate objects from array of objects es6"

0

remove duplicates objects from array javascript

arr.reduce((acc, current) => {
  const x = acc.find(item => item.id === current.id);
  if (!x) {
    return acc.concat([current]);
  } else {
    return acc;
  }
}, []);
Posted by: Guest on November-09-2020

Code answers related to "javascript remove duplicate objects from array of objects es6"

Code answers related to "Javascript"

Browse Popular Code Answers by Language