Answers for "array object duplicate remove with javascript"

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 "array object duplicate remove with javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language