My idea was to create one function that returns the value of the call at rest service.
Code from inside function:
.....
var dddd;
$.ajax({
type: "GET",
url: "http://localhost:8084/GetSomeRest/asdf/ddd/arbol/1",
contentType: "application/json; charset=utf-8",
dataType: "json",
async: "false", // with this line add solved
success: function (dataaa) {
// do something
dddd= dataaa.name;
alert(dddd);// here has value
}});
alertt(dddd); //here is null
.....
What is the problem? Any help is welcome.