<script src="./js/ajaxTools.js"></script>
<script>
function getMenu(meau){
let arr= JSON.parse(meau)
let Arr=arr["breakfast_menu"]["food"];
let str="";
Arr.forEach(item=>{
str+=`
<tr>
<td>${item.name}</td>
<td>${item.price}</td>
<td>${item.description}</td>
<td>${item.calories}</td>
</tr>
`
})
document.getElementById("tbody").innerHTML = str;
}
function getMenusDate(){
ajax2013useobjandpromise({
url:"./json/caidanJson.json",
}).then(getMenu)
}
window.onload=function(){
getMenusDate();
}
</script>