我剛剛開始瞭解API,JSON和Jquery,我被卡住了。如何將控制檯日誌從我的Jquery調用下面 -控制檯日誌JSON結果
名道:「老磨坊咖啡館」
這裏是我當前的代碼:
$(document).ready(function(){
$("#mainbutton").on("click", function() {
$.ajax({
url: "https://developers.zomato.com/api/v2.1/search?entity_id=Chicago%2C%20IL%20&entity_type=city",
headers: {
"X-Zomato-API-Key": "…"
},
method: "GET"
}).done(function(data) {
console.log(data);
});
});
});
你的問題是什麼? – Mikkel