Underscore.js to filter out the unique values
问题 Here is a link to my Fiddle I have a table that is created dynamically from the JSON obtained from a Ajax response. I have duplicate entries in the table. For example xxx,xxx . I want to group them and have it like <td data-count="some count">xxx</td> I tried using underscore.js but it seems to break the rowspan functionality. I converted the arr into a object using _countBy(arr) and I obtained an object of the following format. {xxx: 2, zzz: 1} Question : How can I modify the generateTable()