I have an associative array and I need to get all possible combinations of the first dimension.
My array looks like this:
var array = [
First:[[1,2,5,15,20], [3,4,6], [7,8]],
Second:[[2,4,6], [1,31,7]],
Third:[[1,2,6], [3,1,23,7,4], [5,8,9], [10,12,17]];
The output should look like that
array([[1,2,5,15,20],[2,4,6],[1,2,6]],
[[1,2,5,15,20],[2,4,6],[3,1,23,7,4]],
[[1,2,5,15,20],[2,4,6],[5,8,9],
[[1,2,5,15,20],[2,4,6],[10,12,17]],
[[1,2,5,15,20],[1,31,7],[1,2,6]],
...
[[7,8],[1,31,7],[10,12,17]]);
I've already tried several functions for Cartesian Products, but no one did work