Skip to content

Instantly share code, notes, and snippets.

View nattyman's full-sized avatar

Heath J Howard nattyman

View GitHub Profile
@nattyman
nattyman / reader.js
Last active April 24, 2017 22:04
Parse JSON from file in nodejs
var fs = require('fs');
var users = JSON.parse(fs.readFileSync('./users.json', 'utf8'));
console.log(users[0]);
for (i=0; i<users.length; i++) {
console.log(users[i].name);
}