how to check if an object contains a key regardless of its value code example
Example 1: check if a key exists in an object javascript
"key" in obj // true, regardless of the actual value
Example 2: js check if object key exists
var obj = { key: undefined };
obj["key"] !== undefined // false, but the key exists!