1const object1 = {
2 a: {val: "aa"},
3 b: {val: "bb"},
4 c: {val: "cc"}
5};
6
7let a = Object.values(object1).find((obj) => {
8 return obj.val == "bb"
9});
10console.log(a)
11//Object { val: "bb" }
12//Use this for finding an item inside an object.