Angular - HttpClient: Map Get method object result to array property
I am calling an API that returns a JSON Object. I need just the value of the array to map to a Observable . If I call api that just returns the array my service call works. Below is my sample code .. // my service call .. import { Injectable } from '@angular/core'; import {Observable} from 'rxjs/Observable'; import {Show} from '../models/show'; import {HttpClient} from '@angular/common/http'; @Injectable() export class MyService { constructor(private http: HttpClient ) { } findAllShows(): Observable<Show[]> { return this.http .get<Show[]>(`${someURL}/shows`) } } If the return is a JSON Object