{
"data": {
"weather": [{
"id": 800,
"main": "Clear",
"description": "clear sky",
"icon": "01d"
}],
"id": 1271714,
"name": "Gandhi Nagar",
"cod": 200
},
"status": 200,
"config": {
"method": "GET",
"transformRequest": [null],
"transformResponse": [null],
"url": "http://api.openweathermap.org/data/2.5/weather?lat=13.0414146&lon=80.2599991&appid=016040457f30e1967b4025f18e225136",
"headers": {
"Accept": "application/json, text/plain, */*"
}
},
"statusText": "OK"
}
Unable to access the data.name string. The method I use is as follows. The below mentioned method returns an error. I am new to AngularJS, please do help me if I am making any mistake.
var city = angular.fromJson(result.data.name);
$httpcall ?