re: How to remove duplicate objects from an array (javascript) VIEW POST

VIEW PARENT COMMENT VIEW FULL DISCUSSION
 

This was a great article. This helped me with my project. I was using faker to create some data but faker created duplicate names in an array of objects, but the client didn't want any duplicates.

Worked perfectly Thanks!!

Still trying to understand the code though.

Especially
.filter(e=>e).map(e=>arr[e]);

Gotta dig deeper with map and filter!

code of conduct - report abuse