I'm coding a plugin in Google Sketchup with ruby and I faced a real problem while trying to permute two arrays that are present in an array all this depending on a user combination.
I have an array of arrays like
[["1"],["lol"], ["so"]]When we have a combination like this <
[1, 2, 3]it's fine, it should stay the same :[["1"],["lol"], ["so"]]But when we have a combination like this
[2, 3, 1], the output should be :[["lol"], ["so"], ["1"]]For
[3,1,2]=>[["so"], ["1"], ["lol"]]...etc
EDIT
Sorry guys I forgot for the array I have a bit like : [["1, 2, 3"], ["lol1, lol2, lol3"], ["so1, so2, so3"]] so for the combination [2, 3, 1] the output should be : [["2, 3, 1"], ["lol2, lol3, lol1"], ["so2, so3, so1"]]
Thanks for helping me out.