Get list of unique values from column

Posted by: parmarkinjalk on 4 May 2020, 8:52 pm EST

  • Posted 4 May 2020, 8:52 pm EST

    Hi Team,

    How do I get the list(Array) of unique values from a particular column like we see in column filter. For E.g. I have a data set of 500 items and 1 of the column is countries with 20 different countries repeated multiple times. I just want that list of 20 countries.

    Thanks.

  • Posted 4 May 2020, 8:57 pm EST

    just FYI- I am using Wijmo - 5.20193.637 with Angular-8.

  • Posted 5 May 2020, 2:36 am EST

    Hi Kinjalk,

    The filter editor does not use any special function. It just iterates over all the values and creates an array. So, you can also do the same. First, you will need to create an array that only contains the countries value and then you can create a Set of this array which will automatically remove all the duplicates.

    Please refer to the sample link below for reference:

    https://stackblitz.com/edit/angular-axhhbs

    Regards,

    Ashwin

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels