code: public List<Object> toList() {
          List<Object> results = new ArrayList<Object>(this.myArrayList.size());
          for (Object element : this.myArrayList) {
              if (element == null || JSONObject.NULL.equals(element)) {
                  results.add(null);
              } else if (element instanceof JSONArray) {
                  results.add(((JSONArray) element).toList());
              } else if (element instanceof JSONObject) {
                  results.add(((JSONObject) element).toMap());
              } else {
                  results.add(element);
              }
          }
          return results;
      }
docs: Returns a java.util.List containing all of the elements in this array.
  If an element in the array is a JSONArray or JSONObject it will also
  be converted.
  <p>
  Warning: This method assumes that the data structure is acyclical.
  
  @return a java.util.List containing the elements of this array