Closed
Description
The current examples produce output that has number values for both key and value. This is a bit confusing and every single time i look at the docs for this method i have to do my own test in console to understand. I suggest adding an example like this one to the docs:
var users = [
{ 'user': 'barney', 'age': 36, 'active': true },
{ 'user': 'betty', 'age': 34, 'active': true },
{ 'user': 'fred', 'age': 40, 'active': false }
];
_.countBy(users, 'active');
// => { true: 2, false: 1 }
Thanks!