Bruno
Bruno

Reputation: 4665

Is it possible to do LIST operations on the value of a HASH?

I am still new to Redis and wondering if it would be possible to have a HASH of LIST.

Then I could do for example LPOP HASH myKey where the hash set holds each list's key and the lists contains data that I want to manipulate.

Upvotes: 0

Views: 104

Answers (1)

Itamar Haber
Itamar Haber

Reputation: 49962

Redis does not provide nested data structures, therefore a List of Hashes isn't possible. A Redis List can only contain strings, but what you could do is store the Hashes' key names in a List and do HGET after popping.

Upvotes: 3

Related Questions