I have 2 arrays that I want a Cartesian product of. As an example:
Customer Array:
[10,A]
[11,B]
Debtor Array:
[88,W]
[99,X]
I want to produce a new customerDebtor
array with:
[10,A,88,W]
[10,A,99,X]
[11,B,88,W]
[11,B,99,X]
I am attempting it with this code:
for (var i = 0; i < customerArray.length; i++) {
for (var l = 0; l < debtorArray.length; l++) {
$.each(customerArray[i], function (ndx, val) {
//???? push values into customerDebtorMatrix array
});
}
}