1

I am using npm redis package to store data into redis .

  I want to store below data into  "user:123" cache key.
    {      child1:{key1:val1,key2:val2},
           child2:{key1:val1,key2:val2},
           child3:{key1:val1,key2:val2}  
     }

 client.hmget("users:123",  function (err, obj) {
   console.log(obj);//I should get output in above format
 });
Shree
  • 145
  • 4
  • 15

1 Answers1

-1

I dunno node, but In Java I convert it to a JSON string and use hset

HSET hashmap_name key value

user898384
  • 204
  • 3
  • 6