Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8614381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:06:30+00:00 2026-06-12T05:06:30+00:00

My data structure is like below in redis . I want to get all

  • 0

My data structure is like below in redis. I want to get all the value in list and it’s relavent data from other sets.

Data structure :

lpush mylist test1
lpush mylist test2
lpush mylist test3

set test1 "test1 value1"
set test1 "test1 value2"
set test2 "test2 value1"
set test2 "test2 value2"

I want to get all values from list and relevant set values.

I tried like this below.

var redis        = require('redis')
var redis_client = redis.createClient();


var test = redis_client.lrange(conv_id, 0, -1, function (error, response) {
                     return response;
             });

var datas = redis_client.mget(test, function (error, response) {
                     res.send("datas_text", {data: response});
             });

How to get the callback value ?

But this way it is working.

 redis_client.lrange(conv_id, 0, -1, function (error, response) {
                   redis_client.mget(response, function (err, datas) {
                      res.send("datas_text", {data: datas});
                   });
             });
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T05:06:31+00:00Added an answer on June 12, 2026 at 5:06 am

    You have to remember that node.js works asynchronously; what it means is that when your code runs all time consuming activities are being set to run on the background and the variable that is supposed to hold returning value will be null.

    What you have to do is create a callback function that will run when the process is finished; read up this free ebook: http://www.nodebeginner.org/ it explains how node.js works very well.

    Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Data structure is a dictionary, each value is another dictionary, like: >>> from lib
I've created a data structure like below public class LogList { public int _id;
My table have data structure like this cate_id task_id date_start date_end other 34 14
I have a JSON-like data structure (which I don't want to change) that is
I have a singleton in singleton data structure. Currently my implementation is like below:
My Structure of data will be like below var data = {Questions : [
I have a JavaScript data structure like the following in my Node.js/Express web app:
I need a data structure that acts like a SortedDictionary<int, double> but is sorted
Using EF4 and Linq I have a data structure which looks like this: parentid
I have the need to use a Stack-like data structure for a program that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.