Array.prototype.where = function (prop, value = undefined) {
    return this.filter(function (el) {
        if (value !== undefined) {
            return el[prop] == value;
        }