I'm using node_redis and I'd like to save a structure like:
{
users :
"alex" : { "email" : "alex@gmail.com",
"password" : "alex123"},
"sandra" : { "email" : "sandra@gmail.com",
"password" : "sandra123"},
...
}
Currently, for each user I create a JSON object:
jsonObj = { "email" : "alex@gmail.com",
"password" : "alex123"}
and do a
db.hmset("alex", JSON.stringify(jsonObj))
Is it possible to embedded this strucute in another structure (the users one ?) How could I set users["alex"] with this structure ?