title: blob to base64 converstion javascript
body: <p>I am trying to parse blob object into base64 string in javascript. Please help. my code is </p>
  
  <pre><code>var reader = new FileReader();
  
  reader.addEventListener("loadend", function () {
      // reader.result contains the contents of blob as a typed array
      var buffer = reader.result;
      var view = new Uint8Array(buffer);
      var binary = String.fromCharCode.apply(window, view);
      var base64 = btoa(binary);
      cb(base64);
      console.log(base64);
  }); 
  
  reader.readAsArrayBuffer(data.blob);
  </code></pre>