I have a service written that sends some data to an API request. However, i need to call it multiple times depending on how many checkboxes a user clicked. What is the best way to do this? I was looking into Observables forkJoin method but am not sure how to implement it.
Here is how i currently call the service (without loop):
this.myService.update(id, data).subscribe(
data => {
console.log('Data: ', data);
},
error => { console.log('Error: ', error }
);
idsin an array that i need to loop over and call this service method in it.