Last active
June 28, 2021 14:10
-
-
Save jyydev/7a169f58b42dd1d395fa9b32853817c6 to your computer and use it in GitHub Desktop.
fs read local json file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var folder = 'vs_code'; | |
var file = 'keyboard_shortcuts'; | |
var path = `${folder}/${file}.json` | |
var jsonFile = fs.readFileSync(path); | |
rs = JSON.parse(jsonFile); | |
console.log(rs); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment