-4
 "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"

hey guys this is my json data.how can show text and image from multi image url

AskNilesh
  • 67,701
  • 16
  • 123
  • 163

1 Answers1

0

"teachers" should better be a jsonArray. This way you will not need to be numbering objects inside.

Now to answer you. Suppose the root of your json is a jsonObject.

JSONObject root = ...// JSONObject data = root.getJSONObject("data"); JSONObject teachers = data.getJSONObject("teachers"); JSONObject teacher = teachers. getJSONObject("0");

Francis Nduba Numbi
  • 2,499
  • 1
  • 11
  • 22