Skip to content

Instantly share code, notes, and snippets.

@hrmoller
Last active August 29, 2015 13:57
Show Gist options
  • Save hrmoller/9434639 to your computer and use it in GitHub Desktop.
Save hrmoller/9434639 to your computer and use it in GitHub Desktop.

Revisions

  1. hrmoller renamed this gist Mar 20, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. hrmoller renamed this gist Mar 20, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. @cjoudrey cjoudrey created this gist May 24, 2011.
    13 changes: 13 additions & 0 deletions gistfile1.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    var fs = require('fs');
    var file = __dirname + '/test.json';

    fs.readFile(file, 'utf8', function (err, data) {
    if (err) {
    console.log('Error: ' + err);
    return;
    }

    data = JSON.parse(data);

    console.dir(data);
    });