how to extract value from the json response which is under array and array is under object
<p><a href="https://i.stack.imgur.com/fVAMK.png" rel="nofollow noreferrer">enter image description here</a> JSON Response:-</p>

<p>{
  "hotelogix": {
    "version": "1.0",
    "datetime": "2017-01-17T11:37:58",
    "response": {
      "status": {
        "code": 0,
        "message": "success"
      },
      "nightAuditDate": "2015-04-15",
      "lastUpdatedOn": "2017-01-17 11:05:40",
      "isUpdated": true,
      "totalRecords": "2",
      "totalPages": 1,
      "bookings": [
        {
          "isGroup": false,
          "group": null,
          "id": "gbighAuuug||",
          "mainId": "gbighAuuug||",
          "checkInDate": "2015-04-15",
          "checkOutDate": "2015-04-16",
          "adult": 2,
          "child": 0,
          "infant": 0,
          "code": "12281852",
          "reservationStatus": "RESERVE",
          "businessSourcesId": null,
          "source": "PMS",
          "preference": "",
          "roomStays": [
            {
              "date": "2015-04-15",
              "roomTypeId": "gb_BTEs|",
              "roomTypeName": "old age rooms",
              "roomTypeCode": "CLSccc",
              "roomId": "0",
              "roomName": "",
              "rateId": "gw||",
              "rateName": "Seasonal Rate",
              "amount": "600.000000",
              "tax": "0.000000",
              "discountAmount": "0.000000"
            }
          ],
          "guestStays": [
            {
              "id": "h2H4TkT2Bw||",
              "mainId": "h2H4TkT2Bw||",
              "checkInDate": "2015-04-15",
              "checkOutDate": "2015-04-16",
              "status": "RESERVE",
              "isPrimary": true,
              "isChargeSharer": true,
              "type": "Adult",
              "guestDetails": {
                "id": "gsgPzJITYA||",
                "code": "P949",
                "salutation": null,
                "fName": "Neha",
                "lName": "Sharma",
                "email": "neha@hotelogix.com",
                "phoneNo": "55887799",
                "mobileNo": "",
                "gender": null,
                "nationality": null,
                "identityTypeId": null,
                "identityNo": null,
                "isBlackList": false,
                "isVip": false,
                "dob": "-0001-11-30",
                "organization": null,
                "designation": null,
                "spouseSalutation": null,
                "spouseFName": null,
                "spouseLName": null,
                "spouseDob": "0000-00-00 00:00:00",
                "anniversary": "0000-00-00 00:00:00",
                "addresses": {
                  "home": {
                    "address": "",
                    "country": null,
                    "state": null,
                    "city": "",
                    "zip": "",
                    "fax": null
                  },
                  "work": {
                    "address": "",
                    "country": null,
                    "state": null,
                    "city": "",
                    "zip": "",
                    "fax": null,
                    "phone": null,
                    "mobile": null
                  }
                },
                "files": []
              }
            },
            {
              "id": "h2H4TkT2Ag||",
              "mainId": "h2H4TkT2Ag||",
              "checkInDate": "2015-04-15",
              "checkOutDate": "2015-04-16",
              "status": "RESERVE",
              "isPrimary": false,
              "isChargeSharer": false,
              "type": "Adult",
              "guestDetails": {
                "id": "gsgPzJITYg||",
                "code": "P951",
                "salutation": null,
                "fName": "Mayajhanti",
                "lName": "Jha",
                "email": "mayanti@hotelogix.com",
                "phoneNo": "01158988888",
                "mobileNo": "99680480558",
                "gender": "Male",
                "nationality": "US",
                "identityTypeId": null,
                "identityNo": null,
                "isBlackList": false,
                "isVip": false,
                "dob": "-0001-11-30",
                "organization": null,
                "designation": null,
                "spouseSalutation": null,
                "spouseFName": null,
                "spouseLName": null,
                "spouseDob": "0000-00-00 00:00:00",
                "anniversary": "0000-00-00 00:00:00",
                "addresses": {
                  "home": {
                    "address": "D-996, Cross Road",
                    "country": "US",
                    "state": "CA",
                    "city": "Los Angeles",
                    "zip": "325215",
                    "fax": null
                  },
                  "work": {
                    "address": "",
                    "country": null,
                    "state": null,
                    "city": "",
                    "zip": "",
                    "fax": null,
                    "phone": null,
                    "mobile": null
                  }
                },
                "files": [
                  {
                    "name": "Id Proof",
                    "url": "c://Users//mukesh//Desktop//abc.png"
                  },
                  {
                    "name": "Id Proof",
                    "url": "c://Users//mukesh//Desktop//abc.png"
                  }
                ]
              }
            }
          ],
          "payments": [],
          "otherCharges": [],
          "addons": [],
          "isHoldTill": false,
          "releaseDate": "0000-00-00 00:00:00"
        },
        {
          "isGroup": true,
          "group": {
            "id": "h2AIqHf1",
            "mainId": "h2AIqHf1",
            "checkInDate": "2015-04-15",
            "checkOutDate": "2015-04-16",
            "code": "G 0117433",
            "groupStatus": "RESERVE",
            "businessSourcesId": null,
            "source": "",
            "preference": "",
            "ownerType": "Guest",
            "owner": {
              "id": "gsgPzf2HQw||",
              "code": "P957",
              "salutation": null,
              "fName": "juna",
              "lName": "mishra",
              "email": "juna@hotelogix.com",
              "phoneNo": "",
              "mobileNo": "8802640811",
              "gender": null,
              "nationality": null,
              "identityTypeId": null,
              "identityNo": null,
              "isBlackList": false,
              "isVip": false,
              "dob": "-0001-11-30",
              "organization": null,
              "designation": null,
              "spouseSalutation": null,
              "spouseFName": null,
              "spouseLName": null,
              "spouseDob": "0000-00-00 00:00:00",
              "anniversary": "0000-00-00 00:00:00",
              "addresses": {
                "home": {
                  "address": "",
                  "country": null,
                  "state": null,
                  "city": "",
                  "zip": "",
                  "fax": null
                },
                "work": {
                  "address": "",
                  "country": null,
                  "state": null,
                  "city": "",
                  "zip": "",
                  "fax": null,
                  "phone": null,
                  "mobile": null
                }
              },
              "files": []
            },
            "payTerm": 2,
            "payments": [],
            "otherCharges": [],
            "groupLeader": []
          },
          "id": "gbihNuZBbA||",
          "mainId": "gbihNuZBbA||",
          "checkInDate": "2015-04-15",
          "checkOutDate": "2015-04-16",
          "adult": 1,
          "child": 0,
          "infant": 0,
          "code": "01171859",
          "reservationStatus": "RESERVE",
          "businessSourcesId": null,
          "source": "PMS",
          "preference": "",
          "roomStays": [
            {
              "date": "2015-04-15",
              "roomTypeId": "gb_BTEs|",
              "roomTypeName": "old age rooms",
              "roomTypeCode": "CLSccc",
              "roomId": "0",
              "roomName": "",
              "rateId": "gw||",
              "rateName": "Seasonal Rate",
              "amount": "500.000000",
              "tax": "0.000000",
              "discountAmount": "0.000000"
            }
          ],
          "guestStays": [
            {
              "id": "h2ANlxcGFg||",
              "mainId": "h2ANlxcGFg||",
              "checkInDate": "2015-04-15",
              "checkOutDate": "2015-04-16",
              "status": "RESERVE",
              "isPrimary": true,
              "isChargeSharer": true,
              "type": "Adult",
              "guestDetails": {
                "id": "gsgPzf2HQg||",
                "code": "P958",
                "salutation": null,
                "fName": "mina",
                "lName": "sharma",
                "email": "",
                "phoneNo": "545487875454",
                "mobileNo": "",
                "gender": "Male",
                "nationality": null,
                "identityTypeId": null,
                "identityNo": null,
                "isBlackList": false,
                "isVip": false,
                "dob": "-0001-11-30",
                "organization": null,
                "designation": null,
                "spouseSalutation": null,
                "spouseFName": null,
                "spouseLName": null,
                "spouseDob": "0000-00-00 00:00:00",
                "anniversary": "0000-00-00 00:00:00",
                "addresses": {
                  "home": {
                    "address": "",
                    "country": null,
                    "state": null,
                    "city": "",
                    "zip": "",
                    "fax": null
                  },
                  "work": {
                    "address": "",
                    "country": null,
                    "state": null,
                    "city": "",
                    "zip": "",
                    "fax": null,
                    "phone": null,
                    "mobile": null
                  }
                },
                "files": []
              }
            }
          ],
          "payments": [],
          "otherCharges": [],
          "addons": [],
          "isHoldTill": false,
          "releaseDate": "0000-00-00 00:00:00"
        }
      ]
    },</p>

<pre><code>{
  "xyx": {
    "version": "1.0",
    "datetime": "2016-12-13T05:27:08",
    "response": {
      "status": {
        "code": 0,
        "message": "success"
      },
      "hotels": [
        {
          "id": 6209,
          "userTypes": [
            {
              "id": "UXjk0A||",
              "title": "manager",
              "status": "Active"
            },
            {
              "id": "UJlhsA||",
              "title": "test23",
              "status": "Active"
            },
            {
              "id": "UJll-Q||",
              "title": "march",
              "status": "Active"
            },
            {
              "id": "UJlnNA||",
              "title": "ajay mishra",
              "status": "Active"
            },
            {
              "id": "UJlnMw||",
              "title": "prime",
              "status": "Active"
            },
            {
              "id": "UJlnPg||",
              "title": "rr",
              "status": "Active"
            },
            {
              "id": "UJlnPw||",
              "title": "xman",
              "status": "Active"
            },
            {
              "id": "UJloKg||",
              "title": "sdd",
              "status": "Active"
            },
            {
              "id": "UJloKQ||",
              "title": "tst1",
              "status": "Active"
            },
            {
              "id": "UJloLg||",
              "title": "test2",
              "status": "Active"
            },
            {
              "id": "UJloLw||",
              "title": "test3",
              "status": "Active"
            },
            {
              "id": "UJlpoA||",
              "title": "kk",
              "status": "Active"
            },
            {
              "id": "UJlpqQ||",
              "title": "shantanu manager",
              "status": "Active"
            },
            {
              "id": "UJhGcA||",
              "title": "elbo",
              "status": "Active"
            }
          ]
        }
      ]
    },
    "request": {
      "method": "getusertypes",
      "key": "02w7TK3e-0Ccoyo",
      "data": {
        "hotels": [
          {
            "id": 6209
          }
        ]
      }
    }
  }
}
</code></pre>

<p>My code:-</p>

<pre><code>String getusertypestitlestring = jsonResult.getJSONObject("xyz").getJSONObject("response").getJSONArray("hotels").getJSONArray(0).getString(1);
</code></pre>

<p>:: i want to get userTypes>> title
:: i want to get bookings >> group >> code</p>