javascript - how to insert multiple json data with single key in redis -
i new 1 redis today have stared work on this. have inserted data redis done this
var data = { "name": "xxxxxx", "email": "xxxxx@gmail.com" } db.set('userdetails', json.stringify(data), function (err, result) { console.log(result); }); it inserted fine when try insert new data view newly inserted data not view inserted data . how insert multiple json data using 1 key(userdetails)? there possible create data structure this?
userdetails:
[ { "name": "xxxxxxxxxxxxxx", "email": "xxxxxx@gmail.com" }, { "name": "xxxxxxxxxx", "email": "xxxxxxx@gmail.com" }, { "name": "xxxxxx", "email": "xxxxxxxxx@gmail.com" } ]
take @ redis queue (or set), maybe it's want (http://redis.io/topics/data-types)
Comments
Post a Comment