find duplicate obj properties and return lowest count property
find duplicate obj properties and return lowest count property Lets say I had an array that looked like: [ {count: 1, category: 4}, {count: 2, category: 4}, {count: 3, category: 2}, {count: 4, category: 2}, {count: 5, category: 8}, {count: 6, category: 8}, {count: 7, category: 1}, {count: 8, category: 1}, {count: 9, category: 1} {count: 10, category: 8}, ... ] What I want is to find the lowest count from each category and return a new array of objects. I could easily do this using a plain old loop i think, but would like to use map().reduce or some other new func technique. This should help stackoverflow.com/q/14446511/831878 – Ray Toal Jul 2 at 0:07 4 Answers 4 There are many ways to do it. One would be: function filterLowestCounts(a) { const lowestCo...