I have an array, I need to return a restaurant\'s name, but I only know the value of its \"food\" attribute (not it\'s index number).
For example, how could I return
let restaurant = restaurants.find(element => element.restaurant.food == "chicken");
The find() method returns the value of the first element in the provided array that satisfies the provided testing function.
in: https://developer.mozilla.org/pt-PT/docs/Web/JavaScript/Reference/Global_Objects/Array/find