Here you can find the source of changeItem( key, property, value )
Array.prototype.changeItem = function( key, property, value ) { var done = false; for(var i = 0; i < this.length; i++) {//from w ww . j a v a 2s . c o m if( this[i]["id"] == key) { this[i][property] = value ; done = true; } } return done; };
Array.prototype.addIfUnique = function(key, value) if(this.contains(key)) this[key] = value; else this.push(key); this[key] = value;
Array.prototype.by = function( key, id ) var index = this.length; while( index-- ) if( this[ index ][ key ] == id ) { return this[ index ]; };
Array.prototype.containsProp = function(key,str) { var i = this.length, holder = []; while (i--) { if (this[i][key] === str) { holder.push(this[i]); return holder; ...
Array.prototype.containsReturn = function(key, value) { var i = this.length; while (i--) { if (this[i][key] === value){ return i; return false;
Array.prototype.getKeys = function(){ var keys = ''; for(var i in this) keys += ',' + i; return keys.substr(1).split(',');
Array.prototype.hasKey = function(){ for(i in this){ if(i === arguments[0]) return true; }; return false; };