Skip to content

Instantly share code, notes, and snippets.

@ssaurel
Created July 18, 2019 07:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssaurel/29342a5cd4d106ef89d53432cb76d7ea to your computer and use it in GitHub Desktop.
Save ssaurel/29342a5cd4d106ef89d53432cb76d7ea to your computer and use it in GitHub Desktop.
Parse JSON method for the Chuck Norris Random Facts App on the SSaurel's Channel
function parseJson(json) {
// JSON returned is simple. We have just to display the value property of the JSON Object returned
var fact = "<b>" + json["value"] + "</b>";
document.getElementById("data").innerHTML = fact;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment