$(document).ready(function(){
/* Union Station */
$.getJSON("http://myttc.ca/Union_station.json?callback=?",
function(data){
if (routes.length > 0) {
$.each(data.stops, function(i,item){
$("#Union").append("<p>Stop Name: " + item.name + "</p>");
$.each(item.routes, function(i,item){
$.each(item.stop_times, function(i,item){
$("#Union").append("<p>Departure Times: " + item.departure_time + "</p>");
$("#Union").append("<p>Shape: " + item.shape + "</p>");
});
});
});
}
});
});
I am getting an empty screen in this
can anyone help to fix this jquery to fetch data from json
I only want to display the stop details with departure times
" + data.name + "
").appendTo("#Uni"); }); }); – user2329186 Apr 28 '13 at 14:04