I have this array of object structured like below:
[
{name:"12345", zip: "90860", customerCategory: "loyal"}
{name:"17625", zip: "93011", customerCategory: "new"}
{name:"13545", zip: "90860", customerCategory: "visitor"}
]
When I search this with the javaScript find
function for name as in:
const found = orderList.find(o => o.name === '12345');
The returned result is true; however, I am not sure how to access the values of a certain object when it is found. For example, if I search for 17625 and since it is found, how can I retrieve the other zip and customerCategory values for this particular object (Which would be zip: "93011" and customerCategory: "new" )