title: Saving fetched JSON into variable
body: <p>I'm trying to get JSON saved into a variable, but it seems I don't understand everything here. I get JSON show up in console a once the way I like, but after I try to call it again later it only returns promise. How can I get JSON saved into a variable, so I could use objects in JSON later?</p>
  
  <pre><code>var jsondata = fetch(url).then(
      function(u){ return u.json();}
    ).then(
      function(json){
        console.log(json);
      }
    )
  console.log(jsondata);
  </code></pre>