Created
June 6, 2011 20:23
-
-
Save DveMac/1011015 to your computer and use it in GitHub Desktop.
This file contains 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 result; | |
result = {}; | |
client.keys('article:*', function(err, replies) { | |
replies.forEach(function(k) { | |
client.hgetall(k, function(err, obj) { | |
result[obj.ref] = obj; | |
}); | |
}); | |
}); | |
//wait til done | |
cb(null, result); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
put cb(null, result); after line 7 to have it executed last.