I would like to access this service:
https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=YOUR_API_KEY
I am interested in extracting only two pieces of data:
"location" : {
"lat" : -10.6872332,
"lng" : -37.4329352
However, this service returns data in 11 different classes. My question is: Is it necessary to navigate through all these classes just to access 2 fields?
Currently, my method is stuck at this point.
getCoord(city:string): Observable<any>
{
return this._http.get(this.urlBase+cidade+this.key)
//.map((response: Response) => <any>response.json())
.do(data => console.log('All: ' + JSON.stringify(data)));
}