title: Async/await in map function returning pending promise
body: <p>I'm new to using <code>async/await</code> and am having some problems getting a function to work. <br>
  I have a function <code>getRatings</code> that maps through data returned from a call to my firebase firestore. <br>
  I'm wondering how I use async/await to return the data, because at the moment when I console.log the output of the function, I get</p>
  <blockquote>
  <p>Promise {}</p>
  </blockquote>
  <p>Here's the function in question, <code>filteredVenue</code> represents the data returned from the firebase call:</p>
  <pre><code>  const getRatings = async () =&gt; {
      let arr = [];
      await filteredVenue.map((venue) =&gt; {
         return venue.reviews.map((ratings) =&gt; {
          const ratingsObject = {
            food: ratings.ratingFood,
            service: ratings.ratingService,
            value: ratings.ratingValue,
            atmosphere: ratings.ratingAtmosphere,
          };
          arr.push(ratingsObject);
        })
      })
      const newObject =  {
        food: arr[0].food,
        service: arr[0].service,
        value: arr[0].value,
        atmosphere: arr[0].atmosphere,
      };
      return newObject;
    };
  
    const venueRatings = getRatings() 
  
    console.log(venueRatings) // yields a pending promise
  
  </code></pre>
  <p>Any suggestions?</p>