I had a multiple chanel like this
client.HMSET('live:user:1', {
a: 1,
b: 1
});
client.HMSET('live:user:2', {
a: 2,
b: 2
});
client.HMSET('live:user:3', {
a: 3,
b: 3
});
client.HMSET('otherchanel:user:4', {
a: 4,
b: 4
});
client.HMSET('otherchanel:user:5', {
a: 5,
b: 5
});
client.HMSET('otherchanel:user:6', {
a: 6,
b: 6
});
How can i select all values by key pattern live:*? I need it to retern JSON object to my client app like this:
[{user:1, a:1, b:1}, {user:2, a:2, b:2}, {user:3, a:3, b:3}]