var data = {Shop : "Shopename", email : "email@gmail.com", name : "name"},{Shop : "Shopename2", email : "email2@gmail.com", name : "name2"};
var data2exportforexcel =[data];
//wanted data
[{Shop : "Shopename", email : "email@gmail.com", name : "name"},{Shop : "Shopename2", email : "email2@gmail.com", name : "name2"}];
//我得到的数据
[ '{Shop : "Shopename", email : "email@gmail.com", name : "name"},{Shop : "Shopename2", email : "email2@gmail.com", name : "name2"
}'];
尝试在 data2exportforexcel 上替换。但说它不是函数。
我正在将数据动态获取到数据变量,以便使用 mongoxls 插件将其导出到节点 js mongodb 中的 excel