Newby question here, I'm new to JAVAscript.
I need to do some simple stuff. I'm doing a jquery through $getJSON as:
$.getJSON(Flask.url_for("articles"), parameters).done(function(data, textStatus, jqXHR){
var teste1=JSON.parse(jqXHR.responseText);
console.log(".done");
console.log(teste1);
});
The console.log is printing exactly what I need, but I'm not being able to get teste1 out of the $.getJSON. I could get a JSON object but the responseText is undefined and I can't parse it afterwards.
In resume I need the teste1 out of the $.getJSON.
I tried to return it but nothing really worked. I get the JSON object but I'm unable to get the information inside of it.