Create Unique List of Values and separate from the comma

Create Unique List of Values and separate from the comma

Alex2019Alex2019 Posts: 62Questions: 9Answers: 0
edited October 2021 in DataTables

Hello everyone,
As the title suggests, the code works but for Genre and Stars the values are unique, they should be separated from the comma

example Stars:
Linda Blair, Ellen Burstyn, Max von Sydow, Lee J. Cobb

Linda Bair
Ellen Burstyn
ecc..

example Genre
Comedy, Fantasy

Comedy
Fantasy

code

live.datatables.net/miyajazi/1/edit

Answers

  • kthorngrenkthorngren Posts: 21,443Questions: 26Answers: 4,974

    I would d look at looping through the column data and using Javascript split() to split the data at the comma. Loop through the resulting array and add the unique names to an array to be used to build the checkboxes. Loop through the checkbox array, maybe use Javascript sort(), to build the checkboxes.

    Kevin

  • Alex2019Alex2019 Posts: 62Questions: 9Answers: 0

    Hi kthorngren,
    Sorry, but I'm not a programmer, it's hard for me the code :(
    Can you insert an example on live.datatables.net?

Sign In or Register to comment.