I have an array that is created dynamic from an xml document looking something like this:
myArray[0] = [1,The Melting Pot,A] myArray[1] = [5,Mama\'s Mexican
Try groupBy function offered by http://underscorejs.org/#groupBy
_.groupBy([1.3, 2.1, 2.4], function(num){ return Math.floor(num); }); Result => {1: [1.3], 2: [2.1, 2.4]}