Skip to content

Instantly share code, notes, and snippets.

@DLSteve
Created March 19, 2016 15:42
Show Gist options
  • Save DLSteve/0f40865b5a0123e60531 to your computer and use it in GitHub Desktop.
Save DLSteve/0f40865b5a0123e60531 to your computer and use it in GitHub Desktop.
Try this
/* JSON File
{
"batchcomplete": "",
"continue": {
"sroffset": 10,
"continue": "-||info"
},
"query": {
"searchinfo": {
"totalhits": 20345
},
"search": [
{
"ns": 0,
"title": "Hello",
(...)
*/
//My attempt
//...
$.getJSON(wikiJson, function(data) {
var statusHTML = '<ul class="bulleted"';
$.each(data, function (index, searchResult) {
statusHTML += '<li>' + searchResult.query.search[0].title + '</li>';
});
//...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment