if (Object.prototype.map === undefined) {
    Object.prototype.map = function(fn) {
        var newObj = {};
        for (var i in this) {
            if (this.hasOwnProperty(i)) {
                newObj[i] = fn(i, this[i], this);
            }
        }
        return newObj;
    };
}
if (Object.prototype.filter === undefined) {
    Object.prototype.filter = function(fn) {
        var newObj = {};
        for (var i in this) {
            if (this.hasOwnProperty(i)) {
                if (fn(i, this[i], this)) {
                    newObj[i] = this[i];
                }
            }
        }
        return newObj;
    };
}