Could any one please help me converting the below IF conditions to a list. Each IF condition has one IF block, one 'then' (separated by comma) block and one 'else block'. Nothing really worked close so far.
single IF condition looks like this:
IF(IN(COL1, 'val'), COL2, COL3)
Real-time scenario has nested conditions like this
IF(IN(COL1, 'val1'), 'A', IF(COL2 = 'val2', IF(COL3 = 'val3', 'B', 'C'), 'D')
Looking for a nested list for every IF condition with 'then' and 'else' as separate items like these: ('then' and 'else' can be another IF statement that should follow the same listing process)
["IF(IN(COL1, 'val1')", 'A', ["IF(COL2 = 'val2'", ["IF(COL3 = 'val3'", 'B', 'C'], 'D']]
or
["IN(COL1 = 'val1'", 'A', ["COL2 = 'val2'", ["COL3 = 'val3'", 'B', 'C'], 'D']]