I have two arrays, one is dates and the other is prices. I need to create one JS object containing the intersection of these two.
It needs to look like this:
{ date: "2018-01-01", price: 82 }
or
{ date: date[0], price: price[0]}
... for 250 rows.
I know that I can use Object.assign.apply to combine objects, but then I got an object looking like:
{"2018-01-01": 82 }
without the keys. So how do I format the keys?
Thanks!