我试图简单地访问 Papaparse 中的一个数组 - 然后通过标题名称或仅通过数组地址 (1,1) 等吐出该数组的元素。
但是,我什至无法正确加载数据。行数正确显示为 258,但整个内容为 [object Object]、[object Object]、[object Object] ...等
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="PapaParse/papaparse.min.js"></script>
</head>
<body>
<script>
var results;
var data;
var file = "datapipe.csv";
Papa.parse(file, {
download: true,
header: true,
dynamicTyping: true,
delimiter: "|",
complete: function(results) {
data = results;
console.log("Remote file parsed!", results);
//document.write(results.data["1"][0] );
document.write(results.data );
}
});
</script>
</body>
</html>