Looking for assistance with converting data from a single object in JSON format to another format. Here is the initial data:
var originalData = {
"1": "alpha",
"2": "beta",
"3": "ceta"
}
The desired format is as follows:
var convertedData = [
{id: 1, label: "alpha"},
{id: 2, label: "beta"},
{id: 3, label: "ceta"}
];
If anyone has suggestions on how to achieve this conversion, please share them. Thank you!