I am currently working on modifying the response returned by an API request. At the moment, I receive the response as:
[
{
name: "Afghanistan"
},
{
name: "Åland Islands"
}
]
My goal is to adjust it to:
[
{
name: "Afghanistan",
name1: "Afghanistan",
name2: "Afghanistan"
},
{
name: "Åland Islands",
name1: "Åland Islands",
name2: "Åland Islands"
}
]
I am attempting to duplicate the 'name' field and create new fields such as 'name1', 'name2' within the same object. Here is a functional project https://stackblitz.com/edit/angular-8bzcdp. Can anyone provide assistance?