If I understand correctly, what you actually want to do is put two arrays into an object, and the name of the array becomes the key in the object?
given:
array1 = [...]
array2 = [...]
doing this:
{ array1, array2 }
Note: this is the same as doing { array1: array1, array2: array2 }
should give you:
{
array1: [...],
array2: [...]
}
0
solved how to merge two arrays into two objects of one array