Skip to content

Instantly share code, notes, and snippets.

@agreen757
Created July 25, 2014 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agreen757/958564db8356baf1e7d8 to your computer and use it in GitHub Desktop.
Save agreen757/958564db8356baf1e7d8 to your computer and use it in GitHub Desktop.
4 Thomas
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);
})
@agreen757
Copy link
Author

actually //console.log(contents)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment