jqueryとJSONは初めてです。私は次のJSON構造を持っています。
{
"address":{
"suburb":[
"HACKHAM WEST",
"HUNTFIELD HEIGHTS",
"ONKAPARINGA HILLS",
"m"
],
"state":"SA"
}
}
したがって、基本的に上記はこれからの応答です。
$.ajax({
type:'POST',
url: 'getAddress.php',
data:postCode='+postCode',
success: function(response) {
alert(response)
}
});
したがって、私が取得しようとしているのは、状態を含む変数と、郊外を含む配列です。