I would like to merge my array into one while creating different objects inside it.
The result I want to achieve is:
[{latitude: 19.04890787659077,longitude: 47.49627131324106}, {latitude: 19.07438856746581, longitude: 47.49834420053164}, {etc..}]
My current arrays look like this:
0: 19.04890787659077
1: 18.93150306374864
2: 18.570734077493597
3: 17.948338720442376
4: 18.594379058124062
0: 47.49627131324106
1: 47.44522085405608
2: 47.482922755413774
3: 47.31701880320728
4: 46.052752331223935
The data will be dynamic so I can't solve it by [{latitude: Arr[0], longitude: Arr[5]}, {etc..}]
question from:
https://stackoverflow.com/questions/65900629/how-to-merge-2-arrays-into-1-array-in-javascript 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…