這是我的目標:遍歷內嵌套的對象
family_Data = {
"Family": [
{
"id": "Family-15",
"members":
{
"Family-15-01": [{"Family Code": "Family-15-01","Gender": "Female", "Full Name" : "Evelyn Osei"}],
"Family-15-02": [{"Family Code": "Family-15-02","Gender": "Male", "Full Name" : "David Will"}],
"Family-15-03": [{"Family Code": "Family-15-03","Gender": "Male", "Full Name" : "Edwin Pan"}]
}
}
]
}
我想遍歷「成員」的對象。
瑣碎的使用嵌套的'$ .each',但你嘗試過什麼? –
提示:'family_Data.Family [0] .members'指的是你想循環的對象。 –
您可以使用'for(var key in family_Data.Family [0] .members)'循環獲取所有鍵的對象 – VadimB