$.getJSON('json/test.json', function(data) { that.loadedJSON = data; that.prepareJSON(); }).fail(function() {