JavaScript hashtable contiene clave

if (obj.hasOwnProperty("key1")) {
  ...
}
Faithful Finch