I have that code:
let result = JSON.parse(json);
let schema = fs.readFileSync(path, {encoding: 'utf8'});
result.def = JSON.parse(schema); //add root here
fs.writeFile(`myJson.json`, JSON.stringify(result, null, 2));
I want to add a root to schema
json. How would you do that?
via sreginogemoh
No comments:
Post a Comment