var enums = {
'1': 'HELLO',
'2' : 'BYE',
'3' : 'TATA'
};
I am seeking a solution to convert the above object into an array that resembles the following structure,
[
{
number:'1',
word:'HELLO'
},
{
number:'2',
word:'BYE'
},
{
number:'3',
word:'TATA'
}
]
Most available solutions focus on creating an array of either keys or values, lacking the specific format I am looking for.