Before my API response below code is getting running. I want to get a response from the API call based on the API response I want to proceed further
this._httpservice.getOrderList().subscribe((response: any) => {
Object.entries(response.content).forEach(([key, value]) => {
this.orderList.set(key, value as Array<String>); //Set Value in Map
});
}, error => {
this.errorDetails = error;
});
//Based on the Map value I want to push values in an array
this.orderList.get(this.orderName).map(value => {
this.availableOrders.push(value);
});
subscribeor you convert the observable (getOrderList) and await it instead of a subscription.