I have found the issue however my solution does not work. The variables d0 and d1 get populated but after the code creates and splices the array storelocations. Therefore, I get an error that d0 and d1 is undefined. Any solutions?
Javascript:
$(function () {
$.get("/Map/GetJsonData", function (data) {
storeLocations = [];
var d0 = data[0].Delay;
var d1 = data[1].Delay;
});
var storeLocations = new Array();
storeLocations.splice(storeLocations.length, 0, d0);
storeLocations.splice(storeLocations.length - 1, 0, d1);
}