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? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.