Javascript Array findBy(property, value)

Description

Javascript Array findBy(property, value)

Array.prototype.findBy = function(property, value) {
 return this.filter(function(element) {return element[property] == value}).first();
};



PreviousNext

Related