List of utility methods to do Array Find by ID
findById(id)Array.prototype.findById = function (id) { for (var i = 0; i < this.length; i++) { if (this[i].id == id) { return i; return undefined; }; | |
findById(id)Array.prototype.findById = function(id) { for (var i = 0; i < this.length; i++) { if (this[i].id === id) return this[i]; return false; |