I've got an API with a model "Movie". The movie is linked to a genre. When I'm getting the movie from the API I get the url to the genre as the "genre" attribute.
In my code I'm creating a movie like this:

```
fetchMovies(token: string){

    this.httpOptions = {
      headers: new HttpHeaders({
        'Authorization': 'Bearer ' + token,
        'Content-Type': 'application/json',
      })
    };

    return this.http.get<{[key: string]: MovieData}>(this.url, this.httpOptions).pipe(
      map(res => {
        const movies = [];
        for (const key in res) {
          if (res.hasOwnProperty(key)) {
            movies.push(
              new Movie(
                key,
                res[key].title,
                res[key].desc,
                res[key].year,
                this.getGenre(res[key], res[key].genre),
                res[key].thumbnail,
                res[key].movie,
                res[key].createdUser,
                res[key].premium));
          }
        }
        return movies;
      }),
      tap(movies => {
        this._movies = movies;
      })
    );
  }

```

The `getGenre()` method sould return the genre as a string.

I tried the following:

```
getGenre(key, url): string{
      let result;
      this.http.get(url, this.httpOptions).subscribe(
        (res: any) => {
          result = res.title;
        }
      );
      return result;
    }

```

How can I achive this?

I'm open for any ideas.