Global.Object.prototype.reduce (recursive)
reduce an extended object (ie. a HopObject) to a generic javascript object

  • Parameter HopObject:
    the HopObject to be reduced
  • Returns
    Object the resulting generic object
Sourcecode in /home/hannes/helma/modules/core/Object.js:
47:   Object.prototype.reduce = function(recursive) {
48:       var result = {};
49:       for (var i in this) {
50:           if (this[i] instanceof HopObject == false)
51:               result[i] = this[i];
52:           else if (recursive)
53:               result[i] = this.reduce(true);
54:       }
55:       return result;
56:  }