I have parts of a larger hash set with the same convention:
redis.hmset("this:that:a", {"one": 'two', "three": 'four'});
redis.hmset("this:that:b", {"five": "six", "seven": "eight"});
var all_parts = {};
redis.keys("this:that:*", function(err, keys) {
for (var i=0; i<keys.length; i++){
key = keys[i];
redis.hgetall(key, function(err, obj) {
all_parts[key] = obj;
if (i >= keys.length) {
return console.log(all_parts);
} else {
return console.log('waiting');
}
});
};
});
result in the console.log of...
{ 'this:that:a': { five: 'six', seven: 'eight' } }
{ 'this:that:a': { one: 'two', three: 'four' } }
I don't get what's going on, any help is appreciated.