lvmllc
asked on
Load Jason $.ajax
I have two different URL's to JSON data - one works and the other does not.
My call to the openweathermap works fine, but the citybikeNYC fails.
It looked to me like the structure was the same so not sure why this is happening.
My call to the openweathermap works fine, but the citybikeNYC fails.
It looked to me like the structure was the same so not sure why this is happening.
//myURL = 'http://www.citibikenyc.com/stations/json';
myURL = 'http://api.openweathermap.org/data/2.5/find?lat=42.033449&lon=-93.630885&cnt=15&units=imperial';
//load data from external source
$.ajax({
url: myURL,
dataType: 'json',
jsonp: false
}).done(function(data) {
console.log(data);
console.log(data.count + ' data count');
});
Thats a cross origin policy error, they need to allow you to access the api or use jsonp
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.