I have a scenario as below where I need to group the values based on the values from the datatable.
01,02,03 (individually or in combination of these numbers) – Group 1
08,09,10,11(individually or in combination of these numbers) – Group 2
12,15,54,77,88 (individually or in combination of these numbers) – Group 3
01,08,15,96,99 (any combination of these numbers) – Group 4
Any other number – Group 5
Eg: 01,03 - Group 1
01,08,96 - Group 5
08,09,11 - Group 2 etc
What is the way we can achieve this?
01, 08 and 15 all belong to 2 groups. So if only 01 appears it will be Group 1 but if it appears in combination of numbers it will be different group (either Group 1 or Group 4).
Eg. 01 only - Group 1
01,03 - Group 1
01,02,03 - Group 1
01, 08, 96 - Group 4
01,08,15,99 - Group 4