If you want to iterate though object properties than you can use hasOwnProperty method see the code below:-for (var property in object) {
if (object.hasOwnProperty(property)) {
// do stuff
}
}
The hasOwnProperty method simply checks to see if this is a property specific to this class, and not one inherited from the base class.