for (i=0 ; i < pri.state.totalConversations; i++) {
redisclient.lindex("conversationsIDList",i, function(err,reply) {
convID = reply;
console.log("ConvID: " + "i: " + i + " "+ convID);
});
if(convID == pri.state.lastUpdatedConversationID)
break;
redisclient.hget("conversations", convID, function(err,reply) {
console.log("ConvID hget: "+ convID + " "+ reply);
data = JSON.parse(reply);
console.log("data: " +data);
});
above is a snippet of my code. redis-cli hget command returns the right answer which confirms that i have the hash setup correctly with the right key and field/values. However, the code snippet above returns "null" for hget, (convID has correct value which is the field for hget) - i dont understand why -