I have the following input
input = [{a:[1,2]}, {b:[3,4]}];
and I want to make a cross product output using this input which looks like
output = [{a:1, b:3},{a:1, b:4},{a:2, b:3},{a:2, b:4}];
input could be dynamic like
input = [{a:[1]}, {b:[2,4]}, {c:[3,5,6]}];
Lodash or any standard library could be used.