How can I transform an object into an array of objects?
Input:
{
AF: 'Afghanistan',
AX: 'Åland Islands',
AL: 'Albania',
DZ: 'Algeria'
}
Output:
[
{value: 'AF', label: 'Afghanistan'},
{value: 'AX', label: 'Åland Islands'},
{value: 'AL', label: 'Albania'},
{value: 'DZ', label: 'Algeria'}
]