You can specify a function to get the headers as follows :
function returnColumns(){
var retVal;
$.ajax({
dataType: "json",
url: "app/data/headers.json",
data: data,
success: success,
async: false,
success: function(data){
retVal = $.parseJson(data);
}
});
return retVal;
}
Then, in your assignment of columns, you can simply do the following :
columns : returnColumns(),
We can test this further, if you provide the format of the json file you are loading.
Hope this helps!