Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82710

Use of unique() when data is an object

$
0
0

I have a table that is loaded from JSON and for one of the columns the JSON is an object rather than a primitive type eg

{
    "data": [{
        "column1": "30027215",
        "column2": {
            "display": "Some display text",
            "sortvalue": "123"
        }
    }
]}

When i apply the unique() function to column 2, I get one result for each row, regardless if there are duplicate values in columns.display. I understand why this is but is there a way of getting unique() to operate on a specific data attribute in the object, or do I need to write my own unique function?


Viewing all articles
Browse latest Browse all 82710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>