Efficient way to iterate through JSON response in JavaScript -


i have been reviewing khan academy api (https://github.com/khan/khan-api/wiki/khan-academy-api) , identifies http://www.khanacademy.org/api/v1/topictree main api call. using following code list of categories represents same menu structure on actual website.

$(document).ready(function() { $.ajax({ url: "http://www.khanacademy.org/api/v1/topictree", type: 'get', datatype: "json", success: function(data) {                                        for(var = 0; < data.children.length; i++)         {                                    //$("#mylist").append("<a href='http://myurl.com/courses.html?catid="+data.children[i].id+"'>"+data.children[i].title+"</a><br/>");                      }             }   });  }); 

i not able find efficient way @ children of categroy , print out value of url , name. everytime try call api browser hangs since json response 40mb of data. github site @ https://github.com/khan/khan-api/wiki/khan-academy-api mentions should filter topic examples provided not @ root level unable determine relationship of partent child.

can me find efficient way parse json response , children value each top level category? also, tools use iterate through api calls , json responses before committing code? thank can provide!

also, tools use iterate through api calls , json responses before committing code?

if you're asking tools examine response of request api before start coding, google chrome extension advances rest client designed that. there equivalent extensions other mainstream browsers.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -