I need to convert an array list into a single object with specific values using TypeScript in Angular 8. Here is the array:
"arrayList": [{
"name": "Testname1",
"value": "abc"
},
{
"name": "Testname2",
"value": "xyz"
}
]
The desired format for conversion is as follows:
data: {
"Testname1": "abc",
"Testname2": "xyz",
}
Despite my efforts, I keep ending up with a list instead of a single object. Any assistance with achieving the desired outcome would be greatly appreciated.