목록에서 중복된 값 제거하기 객체로 이루어진 배열을 다루는 경우가 많다. 특정 key 를 기준으로 중복된 값을 제거하는 방법을 정리한다. 1 2 3 4 5 const userList = [ { age: 25, name: 'alpha', birthday: '01-01' }, { age: 25, name: 'beta', birthday: '02-02' }, { age: 35, name: 'gamma', birthday: '03-03' } ]; Colored by Color Scripter cs filter + findIndex findIndex는 조건에 맞는 첫 번째 index를 return 하는 특성을 이용해 index와 findIndex의 값이 같은 데이터만 걸러내는 방법이다. 1 2 3 4 5 6 7 ..