I'm trying to return a JSON from a REST endpoint server. I've tried using dom.io.script.get()
, but this is used to access JSONP. dom.xhrget
, is disallow for those requests on their server. My workaround in to user jQuery $.getJSON
to retrieve the JSON object and return it for utilization in JavaScript. Is this possible. This is my psuedo code for this functionality.
url = http://sampleserver6.arcgisonline.com/arcgis/rest/services/Military/FeatureServer/6?f=pjson
function GetJson(url){
$(document).ready(function(){
$getJson(url, function(json){
return json;
});
});
};