Hello everyone,
Following a previous post on redis contrib node (Make redis config node more "dynamic") I am now struggling on the config node from https://flows.nodered.org/node/node-red-contrib-redis
In order to use a redis cluster, the config node as to be initialised with an array looking like this:
[
{
"host": "192.168.1.107",
"port": 6380
},
{
"host": "192.168.1.6",
"port": 6379
},
{
"host": "192.168.1.186",
"port": 6379
},
{
"host": "192.168.1.132",
"port": 6379
},
{
"host": "192.168.1.22",
"port": 6379
},
{
"host": "192.168.1.224",
"port": 6379
}
]
The node can be configured (for the redis server part) using jsonata.
I like to get this value out of an env variable, which is a string.
Unlike the json node, I cannot figure a way to transform a string "looking like an array" to an actual array using jsonata.
I can format the env variable differently if it helps, however, from with the redis node it must be an array as showed above.
Is there a way to achieve that through jsonata transformation ?
Thanks !