Angular 6 : How to identify response of api with forkJoin
reqs = [];
if (shouldUpdatePhone) {
reqs.push(this.customerService.updatePhone(phoneUpdateRequest))
}
if (shouldUpdateAddress) {
reqs.push(this.customerService.updateAddress(addressUpdateRequest))
}
forkJoin(reqs).subscribe(result => {
console.log('result :', result);
//How to know response is from updatePhone and response from updateAddress?
});
How to can i identify response received is belong to updatePhone and updateAddress? based on identification i need to show message to user.
this both api returning Array(2) >
{model:true, code:200, message:null},
{model:true, code:200, message:null}