code: public JSONArray getJSONArray(int index) throws JSONException {
      Object o = get(index);
      if (o instanceof JSONArray) {
        return (JSONArray) o;
      }
      throw new JSONException("JSONArray[" + index + "] is not a JSONArray.");
    }
docs: Get the JSONArray associated with an index.
  
  @param index
  The index must be between 0 and length() - 1.
  @return A JSONArray value.
  @throws JSONException
  If there is no value for the index. or if the value is not a JSONArray