Answer the question
In order to leave comments, you need to log in
How to access a property of an object?
console.dir(obj);
console.dir(obj.status);
console.dir(obj['status']);
function query(my){
var obj = $.post('https://...', { var1: "1", var2: my}, function(go){
return go;
});
console.dir(obj);
console.dir(obj.status);
console.dir(obj['status']);
}
Answer the question
In order to leave comments, you need to log in
If it's jQuery's $.post asynchronous method, you should work with the response in the callback. documentation .
$.post('https://...', { var1: "1", var2: my}, function(data) {
console.log(data);
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question