check if item exists in object javascript code example
Example 1: search if value exists in object javascript
var exists = Object.keys(obj).some(function(k) {
return obj[k] === "test1";
});
Example 2: how to check if object exists in javascript
if (typeof maybeObject != "undefined") {
alert("GOT THERE");
}