Widget:CJP3: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 19: | Line 19: | ||
var jsonURL = "http://www.wikidoc.org/api.php?action=ask&query=[[Pill%20Shape::Oval]]|?Pill%20Imprint|?Pill%20Dosage|?Pill%20Ingred|?Pill%20Color|?Pill%20Shape|?Pill%20Size%20(mm)|?Pill%20Scoring|?NDC|?Pill%20Name&format=json" | var jsonURL = "http://www.wikidoc.org/api.php?action=ask&query=[[Pill%20Shape::Oval]]|?Pill%20Imprint|?Pill%20Dosage|?Pill%20Ingred|?Pill%20Color|?Pill%20Shape|?Pill%20Size%20(mm)|?Pill%20Scoring|?NDC|?Pill%20Name&format=json" | ||
$.getJSON(jsonURL, function (data) { | $.getJSON(jsonURL, function (data) { | ||
var obj = JSON.parse(data); | |||
alert('Success!'); | alert('Success!'); | ||
alert('Data return: ' + | alert('Data return: ' + obj); | ||
$.each(data.query.results, function (index, value) { | $.each(data.query.results, function (index, value) { | ||
//Assign variables the values returned from the function// | //Assign variables the values returned from the function// |