I have a string for example str="a1,a2,a3"
i am using split with comma and then using arr(0),arr(1) and arr(3)
is there any way to do this dynamic, for example i want to pass only 2 values in str="a1,a2"
or sometimes str="a1"
then arr(1) or arr(2) gives error, want to handle dynamically.