I have a datatable with names of web pages:
|ID|Page |Domain |
----------------------------
|1 |test.com/page1|test.com|
|2 |test.com/page2|test.com|
|3 |xyz.net/page1 |xyz.net |
|4 |xyz.net/page2 |xyz.net |
What I want to do is hide (not group) rows with duplicate domain and display only first result for every domain:
|ID|Page |Domain |
----------------------------
|1 |test.com/page1|test.com|
|3 |xyz.net/page1 |xyz.net |
I know how to hide rows based on their value, but I wonder how can I do the above thing.
Do I have to write my own piece of code with a helper map/array, in which i'll store domain that I already displayed? Or is there any smarter way how to do this in datatables?