title: How to chain async/await using for data that depends on the first call
body: <p>Let's say I have an async/await that calls an API that fetches all users.</p>
  
  <pre><code>async function getUsers() {
    const users = await Api.getAllUsers()
  
    return users.map(user =&gt; {
      return {
        id: user.id,
        group: 'data depends on subsequent API call',
      }
    })
  }
  </code></pre>
  
  <p>Within the return map, I have to do another API call to get some data that should be in the same scope.</p>
  
  <pre><code>const groupByUser = Api.getGroupByUserId()
  </code></pre>
  
  <p>How do I accomplish this? Can I put an async/await within the existing one? Do I create an array of all users ids and somehow map through that? I'm kind of lost on where to go next and any input would be appreciated.</p>
  
  <pre><code>// getUsers() passed into componentDidMount() wrapper
  </code></pre>