code: public boolean getBoolean(int index) throws JSONException {
  
          Object o = get(index);
          if (o.equals(Boolean.FALSE) || ((o instanceof String) && ((String)o).equalsIgnoreCase("false"))) {
              return false;
          } else if (o.equals(Boolean.TRUE) || ((o instanceof String) && ((String)o).equalsIgnoreCase("true"))) {
              return true;
          }
          throw new JSONException("JSONArray[" + index + "] is not a Boolean.");
      }
docs: Get the boolean value associated with an index.<p>
  
  The string values "true" and "false" are converted to boolean.<p>
  
  @param index the index must be between 0 and length() - 1
  @return the truth
  @throws JSONException if there is no value for the index or if the value is not convertable to boolean