Through the use of lodash's _.countBy function, I have generated a tally object, counting the number of times a value occurs in an array.
What would be the best method to select the lowest count in the "value -> count" object?
var/input = ["A","A","B","B","C"];
var/tally = _.countBy(input); // Tally is {"A":2, "B":2, "C":1}
// [...solution...]
Console.assert(lowest == "C");
No special handling of ties is required, provided it's tied for the lowest count. Lodash is available.