Skip to content

Instantly share code, notes, and snippets.

@wmantly
Created January 29, 2014 22:18
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 wmantly/8698302 to your computer and use it in GitHub Desktop.
Save wmantly/8698302 to your computer and use it in GitHub Desktop.
var jsonObj = new Object();
client.SMEMBERS("hosts", function (err, replies) {
replies.forEach(function(host){
client.HGETALL(host, function(err, repliesHost){
jsonObj[host] = new extend({host: host}, repliesHost);
console.log(jsonObj[host]);
});
});
/*console.log(jsonObj);*/
res.json(jsonObj);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment