Let's say I have the object:
var Animals = {
cow: {
id: 1,
value: "moo"
},
chicken: {
id: 2,
value: "cluck"
}
};
What I'd like to do override the toString method on all the properties (cow, chicken, etc.). I know I can do it individually, but is there something to cover all properties in one call? Something like:
Animals.properties.prototype.toString = function() {
return this.value;
}