There is not a single clear example that explains how to pull json data as simple as possible. I have a valid json and I need to retrieve it with jQuery
my json output i
Try this one
$.getJSON("http://www.pangeaadvisors.org/sep123/blog.cs.asp",{ PROCESS: "ViewBlog" }, function(json) {
for (var i = 0; i < json.length; i++) {
var title = json[i].Title;
$('<div class="news_title"></div>').html(title).appendTo('#news_wrap');
}
});
as redsquare answered you need for or $.each :)
You'll have to look at how to make cross domain calls with ajax. Making the request like this will be denied by the browser.
Try This
var items = test.items;
$.each(items,function(index,items){
console.log(items.title); /// and items.date
})
UPDATE
Its failing due to your url having 2 dots in the url
Assuming the request is working (check firebug to see if the request goes out as a script tag & the response comes back) you will need to do
$.each( json.items, function(){
...
});
or you can use normal js
for (var i=0; i<json.items.length; i++) {
...
}