This will ignore attributes passed down through the prototype chain.
if(obj.hasOwnProperty('field'))
{
// Do something
}
This will ignore attributes passed down through the prototype chain.
if(obj.hasOwnProperty('field'))
{
// Do something
}