I have an array of country such as:
country=["Afganistan","Albania","Algeria"]
How can I convert this array into array of objects such as:
newarray=[
{ key: 'Afghanistan', value: 'Afghanistan', text: 'Afghanistan' },
{ key: 'Albania', value: 'Albania', text: 'Albania' },
{ key: 'Algeria', value: 'Algeria', text: 'Algeria' }
]