trying to iterate over multiple nested arrays to get every single combination of possible values in a new array.
example:
[
['a1', 'a2'],
['b1', 'b2'],
['c1', 'c2']
]
output:
[
['a1'],
['a2'],
['b1'],
['b2'],
['c1'],
['c2'],
['a1', 'b1'],
['a1', 'b2'],
['a1', 'c1'],
['a1', 'c2'],
['a2', 'b1'],
['a2', 'b2'],
['a2', 'c1'],
['a2', 'c2'],
['b1', 'c1'],
['b1', 'c2'],
['b2', 'c1'],
['b2', 'c2']
]
any idea how I can achieve this, perhaps I need to split arrays in the first place ?