Created
December 20, 2012 21:15
-
-
Save fredeerock/4348647 to your computer and use it in GitHub Desktop.
load json file into javascipt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://stackoverflow.com/questions/2177548/load-json-into-variable | |
var json = (function () { | |
var json = null; | |
$.ajax({ | |
'async': false, | |
'global': false, | |
'url': my_url, | |
'dataType': "json", | |
'success': function (data) { | |
json = data; | |
} | |
}); | |
return json; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment