I have an object like this from an api.
{
"32111" { ...object}
"83276" { ...object}
...
}
How can I convert this to an array for each number ?
like this
“
[
{
id: "32111"
…
},
{
id: "83276"
}
]
The api gives me only a whole object of strings with ids but not a array. How can I convert this to an array?
2
Answers
You can map the keys to new compound objects:
You can use static Object methods.
Then you can operate on them as Arrays.