I have an array of object and I want to loop over the array and call the service for each element, BUT for every element, I want to call the next element only when the current call is done with success, unless block the rest.
onUpload(items: MyItem[]) {
items.forEach(i => {
myService.doSomething(i).subscribe(response => {
// do something with the success item i
// do the next call for the next item
}, error => {
// handle the error
})
})
}
Is there to call Observables in sequence mode not parallel?