title: Accessing data outside of a promise
body: <p>I am using fetch and a promise to make 2 calls to api's and return the data. I have no problem getting the data within the promise I just can't access it outside of it. I would have thought <code>return apiData</code> would return it for use? I imagine I'm missing something like a <code>.finalise</code> or <code>.success</code> to return it outside the promise?</p>
  
  <p>Essentially I'm trying to figure out how I can access the JSON object outside the promise which includes all the data, not just the JSON structure.</p>
  
  <pre><code>var api1 = fetch('api.example1.com/search').then(function(response){ 
           return response.json()
  });
  var api2 = fetch('api.example2.com/search').then(function(response){
           return response.json()
  });
  
  var apiData = {"api1":{},"api2":{}};
  Promise.all([api1,api2]).then(function(values){
      apiData.api1 = values[0];
      apiData.api2 = values[1];
      console.log(JSON.stringify(apiData, null, 4)); 
      //this displays all the data as it's still within the promise
      return apiData;
  });
  console.log(JSON.stringify(apiData, null, 4)); 
      //this doesn't get the values of the api1 and api2 data as it's outside of the
      //promise and only displays the object structure
  </code></pre>