Hi All,
I have some data in an array. I want to groupby the data based on a specific column. Please note, its NOT sorting that I want.
Example:
Name Dept DOJ
AAA D1 1.1.2010
BBB D2 2.1.2010
CCC D1 1.1.2010
DDD D2 2.1.2010
EEE D1 1.1.2010
FFF D2 1.1.2010
I want to groupby the data based on DOJ and then based on dept. So,
the output should be as below:
Name Dept DOJ
AAA D1 1.1.2010
CCC D1 1.1.2010
EEE D1 1.1.2010
FFF D2 1.1.2010
DDD D2 2.1.2010
First, data should be grouped by DOJ ASC and then Dept Asc.
This should be done using jQuery as I have my entire data in an array.
This is to populate a grid with data, and there are around 8 columns, though I have just shown three columns in the above example. The idea here is to perform groupby.
please suggest.
Thanks