I'm trying to get json data from this api: http://chartapi.finance.yahoo.com/instrument/1.0/NFLX/chartdata;type=quote;range=1d/json And I don't know how to get into the returned finance_charts_json_callback().
I'm using Angular 2's http.get():
loadData() {
return this.http
.get(this.url)
.map((res) => res.json())
.subscribe((data) => console.log(data));
}
When it gets to => res.json()
, it throws this error:
EXCEPTION: SyntaxError: Unexpected token i