Say I have an array like this:
var arr = [ {type:\"orange\", title:\"First\"}, {type:\"orange\", title:\"Second\"}, {type:\"banana\", title:\"Thi
JQuery and Underscore are both options to use.
Underscore's groupBy does exactly what you need.
_.groupBy(arr, "type")