Как мне вставить массив хеш-карт в Redis? (Node.js)

Я использую модуль Node.js node_redis:

var data = [ {'name':'matt', 'id':'333' } , {'name':'Jessica','id':'492'} ] ;

//Initialize Redis
var redis = require('redis'),
rclient = redis.createClient(settings.redis.port, settings.redis.host,{pass:settings.redis.password});
rclient.auth(settings.redis.password, function(){});
rclient.on("error", function (err) {});


//OK, insert the data into redis
rclient.set("mykey", data); 

Когда я устанавливаю set , я получаю сообщение об ошибке, почему?

{ stack: [Getter/Setter],
  arguments: undefined,
  type: undefined,
  message: 'ERR wrong number of arguments for \'set\' command' }
Error: ERR wrong number of arguments for 'set' command
5
задан TIMEX 30 June 2011 в 01:02
поделиться