Within my collection of arrays, each containing elements, the structure is as follows:
var result = [
// starting with the outer array
[
// initial internal array
{name: 'A', value: 111},
{name: 'B', value: 222},
{name: 'C', value: 333},
...
],
[
// following internal arrays #2
{name: 'D', value: 55},
{name: 'E', value: 99},
...
],
// more internal arrays #3
{name: 'F', value: 1000},
...
],
...
...
]
My objective is to iterate through each element (A-F
), but limit the looping to only the elements within the first array (A-C
).
The desired output is:
AA, AB, AC, AD, AE, AF
BB, BC, BD, BE, BF
CC, CD, CE, CF
UPDATE: Since I do not have the exact lengths of any of the arrays, fixed values cannot be used.
Additionally, the example above is not restricted to just 2 arrays.