I have a list of 1000 objects returned from an API; they are structured like
{
val1: {col: 'hjkh', …},
val2: {col: 'hekj', …},
val3: {col: 'jhkd', …},
val4: {col: 'kjdj', …},
val5: {col: 'kjdj', …},
}
I would like to convert them using Javascript to something I can iterate as a map in React, something like this would be ideal;
const objects = [
{ name: 'val1', col: 'hjkh', …},
{ name: 'val2', col: 'hekj', …}
];