When passing a response from the Service to the Component for display on the UI, each value needs to be parsed and stored in a variable. This can be achieved by extracting values such as profileId, profileName, regionName, etc. from the response.
[{"profileId":"000234","profileName":"kofi prfl","regionName":"NA ","fileType":"GRRCN","fileVersion":"1.01","fileFreq":"D01","fileFormat":"FIX","emptyFile":"N","cardMask":"Y","uprInd":"N","dataLevel":"01"}]
this.profileDetailsService.getProfileDetails(this.idDisplay)
.subscribe(profileResponse => {
// Parsing of the profileResponse should occur in this section....
this.searchResult = profileResponse;
this.spinnerService.hide();
},
error => {
this.spinnerService.hide();
this.showError();
}
);
Is there a way to separate the values for profileId, profileName, regionName, etc.?