When I do
redis -h host -a password -p port HVALS myhash
command on redis, it will return all values of that hash, one per line. In my case that values are JSON formatted strings.
I want to store that return on shell variable and after that use in loop. That strings are separated with spaces by default.
I can treat all questions to avoid any problem to use this variable with loop structure, but I wonder if redis has some way to return a array of strings structure with redis command.
To give an idea about what I am looking for, think something similar or same result as this command:
redis -h host -a password -p port HVALS myhash | jq -s
In this case jq will work nice because it will recognize JSON objects and will create a array of arrays.
I want to know if is possible to get any array structure of values using only redis, and does not matter if final result is not a valid JSON (forget the fact my strings are JSON strings). And I want only use redis to do this. I can do at shell scripting side, but is not the question.