I have a get response in the below format:
{
"1":"a",
"2":"b"
}
Now I want to convert this into array of objects like this:
[
{
text:"1",value:"a"
},
{
text:"2",value:"b"
}
]
I did it like this:
Array.from(response.data,([text,value])=>({text,value})
but its not working.
How can I do this?