I am using the below to try and convert an array with many columns into an array with 2 columns.
I can see when I do a quick watch that res contains an array called result, but i it is not mapping into the new array.
loadData() {
this.selectprojectfromfavoritesService.getFavorites()
.subscribe(res => {
//this.TempArray.push({ label: res.result.projectNumber, value: res.result.tzeroprojectCaptureId })
const TempArray = res.result.map(result => { return { label: result.projectNumber, value: result.tzeroprojectCaptureId }; });
this.values = this.TempArray ;
});