Skip to content

Instantly share code, notes, and snippets.

@rwatts3
Created November 20, 2017 22:42
Show Gist options
  • Save rwatts3/2c2735ad20db5fc9dcc0b3e9bc6cc5cb to your computer and use it in GitHub Desktop.
Save rwatts3/2c2735ad20db5fc9dcc0b3e9bc6cc5cb to your computer and use it in GitHub Desktop.
Examples for using $.getJSON
var foo = null;
$.getJSON(.....).then( (myData) => {
console.log(myData);
// or assign some data here.
foo = myData;
});
$.getJSON(.....).then( function(myData) {
console.log(myData);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment