"data": { "id": 9, "name": "tala", "role": "Student", "email": "tala@gmail.com", "students": [ { "id": 1, "name": "tala", "type": "Master_Degree", "year": "third", "Semester": null, "specializations": "جراحة", } ] },
我曾經透過這樣做來接收電子郵件:
回應['資料']['電子郵件']
如何從回應['data']['student']中取得「類型」? ?
在您的
data
物件中,學生是一個物件陣列!可以增加這麼多學生!
要存取學生屬性,您必須循環到學生陣列中。