I am working with a JSON object that looks like this:
[
{
"AF28110": 33456.75,
"AF27989": 13297.26
}
]
My goal is to convert it into the following format:
[
{ "name": "AF28110", "price": 33456.75},
{ "name": "AF27989", "price": 13297.26}
]
I have attempted to use various methods like .map() to achieve this transformation, but I have been unsuccessful so far.
If anyone has any insights or ideas on how to accomplish this task, your help would be greatly appreciated! Thank you.