我已经进行了回调,现在使用 JSON.stringify 将我的酒店列表输出到我的浏览器并删除了丑陋的引号。
我现在如何使用 css 只获取我需要的值,例如地址、酒店名称和样式?
我只能设法在没有任何样式的情况下输出整个回调
$.ajax({
url: "http://api.eancdn.com/ean-services/rs/hotel/v3/list?cid=55505&minorRev=20&apiKey=cbrzfta369qwyrm9t5b8y8kf&locale=en_AU&city=Sydney&stateProvinceCode=NW&countryCode=AU&numberOfResults=2&type=json",
dataType: "jsonp",
jsonpCallback:"myCallback",
success: function(data) {
var StrHotelListResponse = data.HotelListResponse.HotelList.HotelSummary;
$.each(StrHotelListResponse, function(index, value) {
var StrHotelListResponse = JSON.stringify(data);
$('#target').append(StrHotelListResponse.replace(/\"/g, ""));
$('#target').console.log(JSON.stringify(StrHotelListResponse));
});
},
error: function(e) {
console.log(e.message);
//alert('no');
}
});