var postData = []; postData.push({name: 'key', value: '200'});
$.ajax({
url: "get-data.php",
method: "POST",
data: postData,
dataType: "json",
async: false,
success: function (response) {
data = response;
},
error: function(xhr, status, error){
do something;
}
});