title: Axios get inside a .then is not working as intended
body: <p>I am using axios to make a http request. Inside the .then() i am using another axios call. Finally, I have a third then() which is supposed to run after the second then but it is actually not doing so.</p>
  
  <pre><code>let assets = [];
  
  export const initAssets = () =&gt; {
      return dispatch =&gt; {
          dispatch(setLoadingToTrue());
          axios.get('https://....json')
              .then(response =&gt; {
                  for(let key in response.data) {
                      assets.push(response.data[key]);
                  }
              })
              .then(() =&gt; {
                  const token = '...';
                  assets.forEach((cur) =&gt; {
                      axios.get('...' + cur.ticker + '/quote?token=' + token)
                      .then(response =&gt; {
                          console.log(response);
                          cur.price = response.data.latestPrice;
                      })                    
                  })                
              })
              .then(() =&gt; {
                  dispatch(initAllAssets(assets));
                  dispatch(setLoadingToFalse());
              })
              .catch(error =&gt; {
                  console.log(error);
                  dispatch(setLoadingToFalse());
              })
      }
  }
  </code></pre>
  
  <p>The dispatch on the last .then are being executed before the axios request in the second then is completed. How can I make the last then run only after the second axios request is completed?</p>