code: public JSONArray getJSONArray(String key) throws JSONException {
      Object o = get(key);
      if (o instanceof JSONArray) {
        return (JSONArray) o;
      }
      throw new JSONException("JSONObject[" + quote(key) + "] is not a JSONArray.");
    }
docs: Get the JSONArray value associated with a key.
  
  @param key
  A key string.
  @return A JSONArray which is the value.
  @throws JSONException
  if the key is not found or if the value is not a JSONArray.