i would like to turn this kind of array:
let myArray = [
{ even: [2,4,6], odd: [1,3,5,7], decimals: [3.14, 12.8] },
{ even: [4,6,8], odd: [7,9,11,13], decimals: [111.1] },
{ even: [16,18], odd: [15,15,17] }
]
into:
myArray = [
{ even: [2,4,6,4,6,8,16,18] },
{ odd: [1,3,5,7,7,9,11,13,15,15,17] },
{ decimals: [3.14, 12.8, 111.1] },
]
Maybe i should use "reduce" for that, but i m not familiar with that function at all. If anyone could show me the good path