I have an array of objects as:
0: {id: "1", name: "Tab1", address: "123 Street"}
1: {id: "2", name: "Tab2", address: "456 Avenue"}
2: {id: "3", name: "Tab3", address: "789 st"}
I want to grab a particular object from the above array based on the "name" key. For example, if I pass the key as "Tab1" it should return me:
0: {id: "1", name: "Tab1", address: "123 Street"}
I can loop through the array and get the values but wanted to know is there any simpler/efficient way to get the desired data.