title: How to use async await inside another async function
body: <p>i have a question about using async await inside another promise. I have a function call another function to get a transaction details.</p>
  <p>When i running the function LastTransactions the field details do not show results. Anyone can help me ?</p>
  <pre><code>LastTransactions: async (transactionKey, page) =&gt; {
  
      const api = `https://api.pagar.me/1/payables?recipient_id=${transactionKey}&amp;count=${totalResults}&amp;page=${page}&amp;api_key=${PagarmeApiKey}`;
      const response = await axios.get(api);
  
      transactions = response.data.map((item) =&gt; {
  
        return {
          id : item.id,
          transactionId : item.transaction_id,
          trxDetails : [transactionDetails(item.transaction_id)],
        }
  
      });
  
      return transactions;
  
    },
  </code></pre>
  <p>and a detail function</p>
  <pre><code>async function transactionDetails(id){
      const response = await axios.get(`https://api.pagar.me/1/transactions/${id}?api_key=${PagarmeApiKey}`)
      const data = response.data;
      return data;
  }
  </code></pre>