I've been trying to convert a word list stored in a JSON file into an array in my code. This is my code so far:
var jstring;
$.getJSON( "link_to_json.json", function( json ) {
jstring= JSON.parse(json);
});
console.log(jstring[0]);
The console log says that the object is undefined no matter what I change.