Posts by Julio Coelho • 41 points
1 post
-
4
votes2
answers11109
viewsA: How to remove duplicate values from an object array easily?
var original = [{a:1}, {a:1}, {a:2}, {a:3}, {a:1}, {a:2}, {a:5}]; var reduced = []; original.forEach((item) => { var duplicated = reduced.findIndex(redItem => { return…
javascriptanswered Julio Coelho 41