"data": { "id": 9, "name": "tala", "role": "Student", "email": "tala@gmail.com", "students": [ { "id": 1, "name": "tala", "type": "Master_Degree", "year": "third", "Semester": null, "specializations": "جراحة", } ] },
I used to receive emails by doing this:
Response['data']['email']
How to get "type" from response['data']['student']? ?
In your
data
object, students is an array of objects!So many students can be added!
To access the student attribute, you must loop into the student array.