I am trying to iterate over an dictionary that has values in form of array those values I want to put in a dictionary I am confused as to what should I do to obtain this
Here is the data that I want to iterate over :
{
t: ["20181019,20181022,...."],
o: ["180.34,189.45,..."],
h: ["180.99,181.40,..."],
l: ["178.57,177.56,...."],
c: ["179.85 ,178.75,...."]
}
Here is what the end product should look like :
[
{ 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 },
]
.map()? Please add to the question. You will need to break the string too. Also will all the strings have equal numbers(/commas?. Add such details