I am working with an API that has the following structure:
[
{
"id": 4,
"code": "IN",
"name": "India",
"recordVersion": "6CB5C760-E145-4FFA-AC63-FAF5F36B6C80",
"updatedBy": "Sini "
},
{
"id": 59,
"code": "UK",
"name": "United Kingdom",
"recordVersion": "3512B084-8DB7-48F6-9E01-C0861E2A128D",
"updatedBy": "sinju "
}
]
My goal is to transform it into the following format:
localizedData = [
{
text: "India",
value: 4
},
{
text: "United Kingdom",
value: 59
}
];
Any suggestions on how to achieve this conversion?