check if field exists in object javascript

JavaScript
if ('field' in obj) {
}

Source

Also in JavaScript: