I have this array:
[ [ '2018-05-28T21:51:00Z',
0.00000858,
0.00000857,
0.00000860,
0.00000855,
12511.81490226 ],
[ '2018-05-28T21:52:00Z',
0.00000853,
0.00000850,
0.00000856,
0.00000847,
12687.20140187 ],
[ '2018-05-28T21:53:00Z',
0.00000848,
0.00000847,
0.00000850,
0.00000846,
12708.9320888 ]
]
And i need to transform it to this:
{
T: [ '2018-05-28T21:51:00Z', '2018-05-28T21:52:00Z', '2018-05-28T21:53:00Z' ],
O: [ 0.00000858, 0.00000853, 0.00000848],
C: [ 0.00000857, 0.00000850, 0.00000847],
H: [ 0.00000860, 0.00000856, 0.00000850],
L: [ 0.00000855, 0.00000847, 0.00000846],
V: [ 12511.81490226, 12687.20140187, 12708.9320888 ]
}
It's predefined places, the first values is always 'T', the second values is always 'O' and so on.
Tried with lodash like this
_.zipObject(['T', 'O', 'H', 'L', 'C'], s.values)
But the results are not the expected. Some advices?