{"id":860,"date":"2022-08-30T15:08:23","date_gmt":"2022-08-30T15:08:23","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/error-in-displaying-retrieved-json-content-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:08:23","modified_gmt":"2022-08-30T15:08:23","slug":"error-in-displaying-retrieved-json-content-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/error-in-displaying-retrieved-json-content-collection-of-common-programming-errors\/","title":{"rendered":"Error in displaying retrieved JSON content-Collection of common programming errors"},"content":{"rendered":"<p>In continuation to my question asked here, i have created a test app to check the json parsing using jquery. It doesnt seem to work. I can append data in the click function. However getting data from that url and parsing seems to fail. Can someone provide some useful hints?<\/p>\n<pre><code>\n\n\n\n$(document).ready(function(){\n  $(\"button\").click(function(){\n    $(\"body\").append(\"<\/code><\/pre>\n<ul>jffnfjnkj<\/ul>\n<pre>\");\n    $.getJSON(\"http:\/\/gdata.youtube.com\/feeds\/api\/standardfeeds\/top_rated?callback=function&amp;alt=jsonc&amp;v=2\", function(data) {\n        var dataContainer = $(\"#data ul\");\n        $.each(data.data.items, function(i, val) {\n         $(\"body\").append(\"<\/pre>\n<ul>jffnfjnkj<\/ul>\n<pre>\");\nif (typeof(val.player) !== 'undefined' &amp;&amp; typeof(val.title) !== 'undefined') {\ndataContainer.append(\"<\/pre>\n<li><code>\"+val.title+\"<\/code><\/li>\n<pre>\");\n        }\n        });\n        });\n\n\n  });\n});\n\n\n\n\n<\/pre>\n<h2><code>Header<\/code><\/h2>\n<pre>\n<br \/>Paragrapgh\n<br \/>Paragraph.\nClick me\n\n\n<\/pre>\n<p><code>TIA, Praveen S<\/code><\/p>\n<p id=\"rop\"><small>Originally posted 2013-11-09 22:49:19. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>In continuation to my question asked here, i have created a test app to check the json parsing using jquery. It doesnt seem to work. I can append data in the click function. However getting data from that url and parsing seems to fail. Can someone provide some useful hints? $(document).ready(function(){ $(&#8220;button&#8221;).click(function(){ $(&#8220;body&#8221;).append(&#8221; jffnfjnkj &#8220;); [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-860","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/860","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=860"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/860\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=860"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}