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.