title: Filling variables after fetching api
body: <p>i want to call a API and after calling it, i want to fill my cache with its data. But i dont know why its not reading my id to fill the variables</p>
  
  <pre><code>
  var Acache = {}, Bcache = {} ;
  
  let path = window.location.pathname;
  let d = new Date();
  d.setHours(0, 0, 0, 0);
  let startdatum = (Math.floor(d.getTime() / 1000.0));
  
  let dl = new Date();
  dl.setHours(24, 0, 0, -1);
  let enddatum = (Math.floor(dl.getTime() / 1000.0));
  
  
  
  fetch(APIcall).then(
      res =&gt; {
          handlecache(res, Acache);
      }
  );
  fetch(APIcall).then(
      res =&gt; {
          handlecache(res, Bcache);
      }
  );
  
  
  function handlecache(res, id) {
  
      res.json()
        .then((myJson) =&gt; {
            id = myJson;
              console.log(myJson);
        })
  
  }
  </code></pre>