1
0

Section 20

This commit is contained in:
Jason Williams
2019-08-11 12:15:16 -06:00
commit 6528d7204a
431 changed files with 32548 additions and 0 deletions

11
playground/1-json.js Normal file
View File

@@ -0,0 +1,11 @@
const fs = require('fs');
const dataBuffer = fs.readFileSync('1-json.json');
const dataJSON = dataBuffer.toString();
const data = JSON.parse(dataJSON);
data.name = 'Jason';
data.age = 38;
const newJSON = JSON.stringify(data);
fs.writeFileSync('1-json.json', newJSON);

1
playground/1-json.json Normal file
View File

@@ -0,0 +1 @@
{"name":"Jason","planet":"Earth","age":38}