I'm working on an project that uses React with hooks and typescript. I'm currently trying to get data from arrays inside an array that I get from my json response. Data what i log after data handling looks like this:
[
[
"2021-09-07",
43
],
[
"2021-09-08",
47
],
[
"2021-09-09",
52
]
]
So the question is, how can i get the numerical values seen in the json, to an array?
EDIT: Got it working now. Had to add this:
const numbers = data.map((item: any) => item[1]);
console.log(numbers);
Thanks alot @Ryan Le