I have two arrays, both with the same length:
- x = [0, 1, 2, 3, ..., 1439]
- y = [12, 55, 23, 46, ..., 99] (random Number between 0 and 100)
I wanna combine it to a two dimensional array like this:
- z = [[0, 12], [1, 55], [2, 23], [3, 46], ..., [1439, 99]]
How do I do it? Nesting, mapping? Basically the first array is the key. In the end I wanna draw a line graph in D3 and all examples I have found use two dimensional arrays. One is the x axis, the other the y axis. Probably possible another way. Thanks