const object1 = {
a: {val: "aa"},
b: {val: "bb"},
c: {val: "cc"}
};
let a = Object.values(object1).find((obj) => {
return obj.val == "bb"
});
console.log(a)
//Object { val: "bb" }
//Use this for finding an item inside an object.
function isBigEnough(element) {
return element >= 15;
}
[12, 5, 8, 130, 44].find(isBigEnough); // 130