"status": true,
"data": {
"teachers_per_page": 15,
"teachers_show_from": 0,
"teachers_found": 142,
"teachers": {
"0": {
"id": "249",
"name": "MD. SHAHJAHAN KABIR",
"position": "Assistant Professor",
"department": "Computer Science And Engineering",
"campus": "Green Road",
"mobile": "01719005174",
"email": "Kabir.cse@diu-bd.net",
"photo": "http://www.diu.ac/ephoto/11384247470513269340.jpg",
"Offday": "monday"
},
"1": {
"id": "247",
"name": "Bushra Ferdousi",
"position": "Assistant Professor",
"department": "Business Administration",
"campus": "Banani"
"mobile": "01911519737",
"email": "Bushra.bba@diu-bd.net",
"photo": "http://www.diu.ac/ephoto/11384247160483915267.jpg",
"Offday": "monday"
嘿伙计这是我的json data.how可以显示来自多图像URL的文本和图像
答案 0 :(得分:0)
"的 教师 强>"最好是jsonArray。这样您就不需要在其中编号对象了。
现在回答你。 假设你的json的根是一个jsonObject。
JSONObject root = ...//
JSONObject data = root.getJSONObject("data");
JSONObject teachers = data.getJSONObject("teachers");
JSONObject teacher = teachers. getJSONObject("0");