JSON Loop using jquery -
after reading questions here, still have difficulty on making loop through json results. here are:
{ "data": { "posts": [ { "post": { "id": "1", "user_id": "1", "title": "test content", "created": "2011-06-30" } }, { "post": { "id": "2", "user_id": "2", "title": "new test content", "created": "2011-06-30" } } ] } }
how can post.title using $.each() ?
$.each(jsonobject.data.posts, function(index, val){ alert(val.post.title); //do want title });
Comments
Post a Comment