This ain't working:
$(document).ready(function () {
var getJ = null;
var url = 'JSON file URL here';
$.getJSON(url, function (data) {
getJ = [...data]
});
});
document.write(getJ[0].Tag)
(The tag here contains some data from JSON file)
This only works when I output getJ inside the function; however, I want it outside.