rxjs Observable - subscribe to result in loop and break on condition / cannot read property 'subscribe' of undefined
问题 I am new to rxjs and can't seem to find the correct operator for what I am trying to do. In my example, I have an array I need to populate with results from an another observable, and once I have enough results in that array from making subscribe calls, I want to break and return the array. // for reference, there is a class variable called keys result = getResults(data, index).subscribe((result: any[]) => { doSomethingWith(result); }); getResults(data: any[], index: number) : Observable<any[