I'm doing a query in an API (SWAPI). Return is an object with all the information of the Star Wars characters. So far so good. But within this object, I have some sub-levels that are arrays and that besides some information, also has another URL that I need to consult to be able to print on the screen. The problem is that I'm not sure how to do this other query. To simplify, follow the return image:
Thisistheserviceget:
getData(page?:string):Observable<any[]>{if(page){this.URL=page;}returnthis.http.get(this.URL).map((response:Response)=><any[]>response.json()).catch(this.handleError);}
IknowthereisawaytodowithflatMapandforkJoin.Ieventried,butIdidnotgettheexpectedresult.
Followthislink: rxjs-observable
But I still could not.