const data = analysis.map(({ ds, index }) => { const time = `${ds}`; const value = index; console.log({ time, value }) return { time, value }; });