Created
April 5, 2013 20:45
-
-
Save imjacobclark/5322482 to your computer and use it in GitHub Desktop.
underscore.js, node & json
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
{ | |
"username" : "imjacobclark", | |
"email" : "[email protected]", | |
"website" : "http://fusionstrike.com" | |
} |
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 _ = require('underscore'); | |
var contents = fs.readFileSync('config.json'); | |
var configs = JSON.parse(contents); | |
_.forEach(configs, function(config){ | |
console.log(config); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment