I am trying to restructure an object that I get from my API. See objects below.
{
"App 1": "5a67-b-45-86e7-bfb351",
"App 2": "293-e2-4a-96c-4471d0ea",
"App 3": "f87d5-e0-41-bd-16dc72e"
}
I would like it to be reconstructed in the following format using Javascript:
I have the following data:
{
"App 1": "5a67-b-45-86e7-bfb351",
"App 2": "293-e2-4a-96c-4471d0ea",
"App 3": "f87d5-e0-41-bd-16dc72e"
}
I would like it to be reconstructed in the following JSON format using Javascript:
[
{
"id" : "5a67-b-45-86e7-bfb351",
"name" : "App 1"
},
{
"id" : "293-e2-4a-96c-4471d0ea",
"name" : "App 2"
},
{
"id":"f87d5-e0-41-bd-16dc72e",
"name":"App 3"
}
]