I am trying to subscribe two observable and get the values to store in an array object. It is working ok but my problem is it iterates three times which i don't understand. I am doing this in a service to create a new service. Below is the code for example. I am also wondering can i use promise instead of observable in angular?. Or can i convert the observable into promise and resolve after I get the value ? Thank you for your help
addEmployeeData() {
const employeeObservable = this.apiService.getEmployeeDataObservable();
employeeObservable.subscribe({
next: (res: any) => {
let employee = res;
const paramsObservable = this.apiService.getParamsObservable();
pageParamsObservable.subscribe({
next: (pageParams: any) => {