Is it possible to store multidimensional array in Redis hash
For example
HMSET('Marray','Name'=>"test12",
"Age"=>"45",
"Salary"=>"50000",
"GENDER"=>array("M"=>"1","F"=>"2"))
Or is any other possibility to store the above values
You can serialize that sub-array (as JSON, for example) and store it in a hash field. Redis doesn't support arbitrarily nested structures.
Or you can even serialize the whole structure and store it as plain string.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With