Skip to content

Instantly share code, notes, and snippets.

@wmantly
Created January 29, 2014 22:18
Embed
What would you like to do?
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