dennismonsewicz Posted April 14, 2009 Share Posted April 14, 2009 I have the following JSON: ([ {"name":"question me?", "answers":["Hello", "Testing"]} ]) and the following jQuery: <script type="text/javascript"> $(function() { //retrieve comments to display on page $.getJSON("javascripts/newdisp.js", function(data) { //create a container for each comment var div = $("<div>").appendTo("#jsonHere"); for (var x = 0; x < data.length; x++) { $("<label>").text(data[x].name).appendTo(div); } for (var z = 0; z < data.length; z++) { $("<div>").text(data[z].answers).appendTo(div); } }); }); </script> I am trying to get the individual answers to show up... and its not working lol... any help? Link to comment https://forums.phpfreaks.com/topic/153959-json-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.