Currently, I am attempting to extract a URL from a JSON object that is nested, but I am encountering difficulties accessing the data. I am unsure of the method to retrieve data from a JSON object that is deeply nested.
app.controller('mainCtrl', function($scope, $http) {
$http.get("https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20json%20where%20url%3D'www.whitehouse.gov%2Ffacts%2Fjson%2Fall%2Fcollege%2520affordability'&format=json&diagnostics=true").then(function(responce) {
$scope.status = responce;
$scope.sortData = responce.data.query.results.json.json.url;
console.log(responce);
console.log($scope.sortData);
});
});
Although I am able to console log the object, I am struggling to extract the URL from the deeply nested object. The JSFiddle link provided below displays the object that is console logged. I appreciate any assistance given.