I work on Angular and use Typescript. I have two arrays array1 and array2 which I have parsed from an API.
A console.log on array1 looks like this :

A console.log on array2 looks like this :
I’d like to create an two dimensionnal array which would merge the two arrays one element by element (id 0 with id 0, id 1 with id 1, id 2 with id 2 and so on). To be clearer the result would be :
[["Outils sali", "saunier"], ["outils elem", "outils trad"], ["outils trad", "outils sali"], .... ];
Would you have any ideas to realize that trick ?
Any help would be very appreciated, thank you !
>Solution :
If both have the same length just use a map operator
array1 = []; // imagine filled
array2 = []; // imagine filled
let result = array1.map((array1Value, index) => [array1Value, array2[index]]);