const obj = { name: "John", age: 25, address: { street: "ABC Street", city: "New York" } }; console.log(_.has(obj, 'name')); // true console.log(_.has(obj, 'address.city')); // true console.log(_.has(obj, 'phone')); // falseIn the example, we are checking if the object 'obj' contains keys 'name', 'address.city' and 'phone'. The function returns true if the key is present in the object, otherwise, it returns false. The package library for this is Underscore.js.