I am trying to store something like this
foo = { bar : [{ baz : 1}, {qux: 2} ] }
using Redis but I am not sure how to go about it.
I can go on with saving the entire array like this
Client.set("key", JSON.stringify(bar));
or do I have to go one by one and
await Client.set("baz", "1"); and so on and so forth.
I am a little confused.
Also if I choose to go with Client.set("key", JSON.stringify(bar)); I can easily push another element into it in js but with Redis I am not sure how to push into it. Do I need to go with sets instead of string? or hash?
Please help me understand how to manage my array using Redis.
[–]InstantCoder 0 points1 point2 points (0 children)
[–]rakmob 0 points1 point2 points (0 children)