You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
344 B
13 lines
344 B
2 years ago
|
let fs = require("fs");
|
||
|
let path = require("path");
|
||
|
|
||
|
|
||
|
let files = fs.readdirSync("./result");
|
||
|
let merged=[];
|
||
|
files.forEach(file => {
|
||
|
let data = JSON.parse(fs.readFileSync(path.join('./result', file), { encoding: "utf8" }));
|
||
|
merged.push(data);
|
||
|
});
|
||
|
|
||
|
fs.writeFileSync("merged.json", JSON.stringify(merged, null, 4), { encoding: "utf8" });
|