title: CSVtoJSON returns UnhandledPromiseRejectionWarning: ReferenceError: JavaScript
body: <p>I am trying to convert CSV from a CSV file to JSON.</p>
  
  <p>I have the following code</p>
  
  <pre><code>(async() =&gt; {
  
  
  
  csvToJson().fromStream(request.get("https://raw.githubusercontent.com/dsfsi/covid19za/master/data/covid19za_provincial_cumulative_timeline_confirmed.csv"))
  .then(source =&gt; {
  
    let latest_provinces_confirmed = source;
  });
  
  console.log(latest_provinces_confirmed)
  ...
  </code></pre>
  
  <p>and when I run it, I get 
  <code>UnhandledPromiseRejectionWarning: ReferenceError: latest_provinces_confirmed is not defined</code></p>
  
  <p>How can I get the result of the CSVtoJSON into a variable to use later</p>
  
  <p>Thanks in advance</p>