I need to return the replies from this function and use the replies in other function. I am newbie to NodeJs and trying to figure out a simple solution.
var getKeys = function(key){
var addkey = key + '*'
myClient.keys(addkey, function (err, replies) {
console.log(replies);
});
}
Question 2:
Is there a way to take variable inside the node_redis function?
Example: redis_get -> Defined function for getting values
thingsUUID[i] = thingsUUIDKey[i].split("_").pop()
redis_get("key", function(redis_items) {
console.log(thingsUUID[i]);
});
Inside redis_get thingsUUID is undefined. I want to concatenate the thingsUUID and the result redis_items