I am using RedisJSON and I can't figure out how to get the full JSON values stored for multiple keys, following the documentation on the official site of the plugin.
For example, from the redis-cli
:
redis-cli-1234> json.set k1 . '{"a":"a" }'
OK
redis-cli-1234> json.set k2 . '{"b":"b" }'
OK
Now I would like to run a command that would get k1, k2 (the keys of the desired values) and return their values, in one-go:
1) "{\"a\":\"a\"}"
2) "{\"b\":\"b\"}"
But I can't figure out how.
I've tried:
redis-cli-1234> json.mget k1 k2 .
And several other stuff, but I can only get redis to return either one value or the other, bot not both.
Any idea?
https://redis.io/topics/transactions