Answer the question
In order to leave comments, you need to log in
How to convert an object to an array in JS?
There is an object of the following form (the number of values may vary):
{0: {…}, 1: {…}, 2: {…}}
0: {0: "01.01.2019", 1: 11111.01}
1: {0: "02.01.2019", 1: 22222.02}
2: {0: "03.01.2019", 1: 33333.03}
__proto__: Object
[
["01.01.2019", 11111.01],
["02.01.2019", 22222.02],
["03.01.2019", 33333.03],
]
Answer the question
In order to leave comments, you need to log in
Object.values({
0: {0: "01.01.2019", 1: 11111.01},
1: {0: "02.01.2019", 1: 22222.02},
2: {0: "03.01.2019", 1: 33333.03}
}).map(i => Object.values(i) )
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question