I have a call with JavaScript and I want to manipulate this data further in other functions, as I could do .. this is an example of my code ...
$.get("https://api.test.com/",
function (data) {
variableGlobal = data[0].one;
}, "json");
also the call with AJAX works for me;
$(function() {
$(document).ready(function(){
$.ajax({
url: 'https://api.test.com/',
type: 'GET',
dataType: 'JSON',
success: function(data){
var variableGlobal = data[0].one;
}
});
});
});
What I want is to be able to use variableGlobal
with any of the two calls later ... in other functions ect ..
Thank you!