title: Redis store lists of values inside Redis hash
body: <p>My task is to get the list of animals (for example) for a specific user_id.</p>
  
  <p>I don't want to use set/list for each user.</p>
  
  <p>I have tried to use hash where each field is a user_id and each value is a concatenated string of animals. For example: <code>{"1234" : "dog cat", "8477" : "bird dog"}</code>. Here, I can get the animals for user "1234", with just one call to Redis.</p>
  
  <p>I know there is an <a href="https://redis.io/commands/append" rel="nofollow noreferrer">APPEND</a> command, that appends items to a string. But this is not working for appending to value inside a hash.</p>
  
  <p>I have also tried to use set, and get the values by prefix. For the example above, my set would contain: <code>("1234:dog", "1234:cat", "8477:bird", "8477:dog")</code>. In order to get all animals for user "1234", I need to search for prefix "1234:". But this is not scale when I have too many items.</p>
  
  <p>What can I do in order to complete my task?</p>