I am struggling to figure out how to iterate over a dictionary with values in the form of arrays and then organize those values into a new dictionary. I am unsure of the steps needed to achieve this.
Below is the data I need to iterate through:
{
t: ["20181019,20181022,...."],
o: ["180.34,189.45,..."],
h: ["180.99,181.40,..."],
l: ["178.57,177.56,...."],
c: ["179.85 ,178.75,...."]
}
And here is the desired end result:
[
{ time: '20181019', open: 180.34, high: 180.99, low: 178.57, close: 179.85 },
{ time: '20181022', open: 180.82, high: 181.40, low: 177.56, close: 178.75 },
{ time: '20190509', open: 193.31, high: 195.08, low: 191.59, close: 194.58 },
]