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 6220855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:01:55+00:00 2026-05-24T08:01:55+00:00

I am using redis + nowjs. I would like to know how to go

  • 0

I am using redis + nowjs.
I would like to know how to go about handling a result from an hgetall()?
When I try to display the “result” in the client side, I only get [object Object] (it is probably a string from the server-side js).

//Redis result is

redis> HSET cards:lightning-bolt name "Lightning Bolt"
(integer) 1
redis> HSET cards:lightning-bolt text "Blah blah blah"
(integer) 1
redis> HGETALL cards:lightning-bolt
1) "name"
2) "Lightning Bolt"
3) "text"
4) "Blah blah blah"
redis>

//In my server js

everyone.now.signalShowRedisCard = function(card_id) {
    var self = this;
    client.hgetall(("cards:%s" % card_id), function (err, res) {
        nowjs.getGroup(self.now.room).now.receiveShowRedisCard(res);
    });
}

//In my client js (the alert just outputs [object Object])

now.receiveShowRedisCard = function(card_data) {
    alert("redis card: "+card_data);
    try {
      console.log('card data: '+ card_data);
    } catch(e) {
      console.log("Firebug not installed.");
    }
}

Any ideas? Any reply is appreciated.

  • 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-05-24T08:01:56+00:00Added an answer on May 24, 2026 at 8:01 am

    From node_redis readme:

    client.hgetall(hash)

    The reply from an HGETALL command will be converted into a JavaScript
    Object by node_redis. That way you can interact with the responses
    using JavaScript syntax.

    I don’t know how exactly is nowjs handling passing JavaScript objects, but you can try to JSON.stringify the res returned from the hgetall on the server side and then see if you get JSON string on the client. If yes then just parse it back to JavaScript object in order to work with it on the client side.

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

Sidebar

Related Questions

I am using redis and node (with node_redis ) and I would like to
Is there a way to directly connect to Redis using client side (not Node.js)
I'm using Rails with redis. From the introduction of Redis, I found such information:
I've been looking at using Redis Pub/Sub as a replacement to RabbitMQ. From my
I'm matching a bunch of strings using REDIS.hmget . The full store has about
I'm using Redis To Go on Heroku, and I'd like to use it to
I am considering using redis for asp.net mvc application, there is no question about
I unsuccessfully tried using txredis (the non blocking twisted api for redis) for a
Using redis-rb, how can I push a hash into a list? Do I have
I am using Redis to store two databases : 0 and 1 via the

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.