I have an excel file with this data
the file was saved as a CSV file. Then I used this function to read an display the file content.
var fileInput = document.getElementById("csv");
readFile = function () {
console.log("file uploaded");
var reader = new FileReader();
reader.onload = function () {
reader.readAsBinaryString(fileInput.files[0]);
};
}
if (fileInput){
fileInput.addEventListener('change', readFile);
}
the function output the image below. What i want to do is to append the function output to an array in this format ["75799757","9744710",...] so that I can use the function below to iterate through each ID to perform a function.
myStringArray.forEach( function(s) {
// ... do something with s ...
} );
I know one can append output to an array using the .push() function but How can I append the output to an array so that it will be in this format ["75799757","9744710",...] with quotation mark and commas?