I have an array of requests. I want to make the first request and check whether the response ({active: true/false}) is true or false. If the response has active: true, do not send other requests and return info. If the response has active: false, send another request and make the same check.
fakeChildService(child: Child): Observable<{active: boolean, info: string}>
{...}
let requests = [];
let children = action['children'];
children.map((child: Child) => {
requests.push(this.myService.fakeChildService(child));
})