javascript how to check if object property exists code example
Example: javascript how to check if object property exists
var person = {'first_name': 'bill','age':20};
if ( person.hasOwnProperty('first_name') ) {
//person has a first_name property
}