I have to loop over some data and make an HTTP call to return data based on the content and after I have all the HTTP data back I need to continue and process the data.
Right now I have this.
let test;
myVar.forEach(async (x) => {
await this.getMyDataFromService(x).subscribe(resp => {
test.push(resp);
}
});
//Process data
console.log(test);
when I console.log the resp is always empty and there is no data.
Thanks for the help.