我想獲得「名稱」,「團隊」和「職位」等的值,我知道我必須用兩個循環來做嗎?確切地知道jquery - 通過多維數組運行(Json
我的代碼如何......看起來是這樣的:
function getPlayersOfChosenTeam(team, nameOfPlayersTable){
$.ajax({
url:'getPlayersOfChosenTeam.php',
type:'post',
data:{'team':team, 'nameOfPlayersTable':nameOfPlayersTable},
success: function (res) {
console.log(res);
}
});
}
和我的資源數據是這樣的:
[
{"name":"R. Burnell","team":"Dortmund","position":"GK","points":"4"},
{"name":"R. Weidenfeller","team":"Dortmund","position":"GK","points":"45"}
]
感謝您的任何提示...
問候
沒有,JSON字符串是在資源內容我張貼基於函數的名稱下面的字符串... – nbg15
你應該看看:如何從異步調用返回響應?](https://stackoverflow.com/questions/14220321/how-do-i-return-the-response-from-an-asynchronous-call) – Andreas
thx爲您提供幫助並在我的描述中對我的錯誤感到抱歉... – nbg15