我还看到过其他问题的答案,它们建议使用papaparse、jquery-csv和csv npm包。我已经阅读了每个解决方案的文档,并不知道我的程序将在流程中的何处读取csv。下面是我尝试jquery-csv时得到的结果 var fs = require('fs');
var csv = require('.
return result// https://github.com/evanplaice/jquery-csvvar dataArray = $.csv.toArrays(data);
// jquery-csv's arrays are made up of strings, but we need them