convert text to blob in javascript code example
Example 1: blob to text javascript
var reader = new FileReader();
reader.onload = function() {
alert(reader.result);
}
reader.readAsText(blob);
Example 2: js string to blob
In order to extract data from a Blob, you need a FileReader.
var reader = new FileReader();
reader.onload = function() {
alert(reader.result);
}
reader.readAsText(blob);