constructor(http:Http) { var mydata = {}; var filmData; http.get('http://www.omdbapi.com/?t=star wars&tomatoes=true&plot=full') // Call map on the response observable to get the parsed people object .map(res => res.json()) // Subscribe to the observable to get the parsed people object and attach it to the // component .subscribe( //data => this.handleData(data), data => this.filmData = data, err => this.logError(err), () => console.log('Film data complete') ); }