Can I compare the answer of a prompt to properties of objects in an array?

I am trying to match the result of a prompt with properties of various objects in an array. (I.e if city entered matches the name of one of the objects listed, return the coinciding temp)

let cities = [
  {
    name: "San Luis Obispo",
    temp: 16,
    uv: 1,
    humidity: 5,
    elevation: 28,
    wind: 2,
  },
  {
    name: "Morro Bay",
    temp: 11,
    uv: 2,
    humidity: 8,
    elevation: 1,
    wind: 8,
  }]

let city = prompt("Enter a city");
if (city === cities.name){
  alert(`It is currently ${temp}°C in ${city}`);
}