Your output is not posible, this is not valid syntax: ["abc": {...}]
what you want to output is an object like so: {"abc": {..}}
You will need to iterate over both arrays, one outer iteration and one inner iteration:
var input = {'array1':['a','b'],'array2':['1','2']};
var output = {};
// Outer iteration:
// a1 will contain each value from array1 (a, b)
input.array1.forEach(function(a1) {
// Inner iteration:
// a2 will contain each value from array2 (1, 2)
input.array2.forEach(function(a2) {
// Concatenate the to values (`a,1`, `a,2`, `b,1`, `b,2`) and assign the dummy object:
output[a1+','+a2] = { prop1: '' };
});
});
console.log(output); // {"a,1":{"prop1":""},"a,2":{"prop1":""},"b,1":{"prop1":""},"b,2":{"prop1":""}}