Created
July 25, 2014 20:08
-
-
Save agreen757/958564db8356baf1e7d8 to your computer and use it in GitHub Desktop.
4 Thomas
This file contains 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 file = __dirname + process.argv[2]; | |
fs.readFile(file, 'utf8', function (err, data) { | |
if (err) { | |
console.log('Error: ' + err); | |
return; | |
} | |
var contents = JSON.parse(data); | |
console.log(contents); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
actually //console.log(contents)