This is my initial data
var array = [
{
time: "2022-04-18",
open: Number(`${125.05}`),
high: Number(`${127.05}`),
low: Number(`${123.05}`),
close: Number(`${126.05}`),
},
];
When I try to update the charts with the same data format like this:
updated.unshift({
time: `${key}`,
open: Number(`${val[["1. open"]]}`),
high: Number(`${val[["2. high"]]}`),
low: Number(`${val[["4. close"]]}`),
close: Number(`${val[["4. close"]]}`),
});
it gives me an error
lightweight-charts.esm.production.js:7 Uncaught TypeError: Cannot read properties of undefined (reading 'year')