나의 경우는 ajax에서 데이터를 가져올때 사용하였다
const result; for (let i = 0; i < data.length; i++){ if (!result.includes(data[i].name)) result.push(data[i].name); } consol.log(result); // 중복검사를 한 데이터를 넣어준다고 생각하면 된다.
참고문서 https://hianna.tistory.com/572