以下数据作为json
值返回。请帮助我如何获取.jquery ajax
{"detail":
{ "ID":001,
"Email":"test@test.com",
"Tel":"123-456-789",
"FirstName":"John",
"MiddleName":null,
"LastName":"Abraham",
"Prefix":null,
"Suffix":null,
"Street":"123 Mew Street",
"City":"New York",
"Region":"NY",
"Country":"USA",
"PostCode":"1011",
"Latitude":null,
"Longitude":null,
"valid":1,
"message":"success"
}
我尝试过如下编码,请建议我更新代码。
$.ajax({
type: "GET",
url: url,
dataType : 'json',
async: false,
success : function(text) { response = text; }
});
alert(response);