public int indexOf(String value) throws JSONException {
        int i = 0;
        boolean found = false;
        while (i<this.length() && !found) {
            found = this.getString(i).equals(value);
            i++;
        }
        return (found)?i-1:-1;
    }