One large commit to avoid dealing with messy patches later on. Turns out I had https://marketplace.visualstudio.com/items?itemName=amatiasq.sort-imports installed with single quotes which messed up all double quotes from prettier.
20 lines
379 B
TypeScript
20 lines
379 B
TypeScript
/* Imports */
|
|
import fs from "fs";
|
|
|
|
/* Definitions */
|
|
let locationData = "./data/";
|
|
|
|
/* Body */
|
|
let rawdata = fs.readFileSync("../data/merged-questions.json", {
|
|
encoding: "utf-8",
|
|
});
|
|
let data = JSON.parse(rawdata);
|
|
|
|
let results = [];
|
|
for (let datum of data) {
|
|
// do something
|
|
}
|
|
|
|
let string = JSON.stringify(results, null, 2);
|
|
fs.writeFileSync("../data/output.txt", string);
|