title: How to create the equivalent of a HashMap<Int, Int[]> in Lua
body: <p>I would like to have a simple data structure in lua resembling a Java HashMap equivalent.</p>
  
  <p>The purpose of this is that I wish to maintain a unique key 'userID' mapped against a set of two values which get constantly updated, for example;</p>
  
  <pre><code>'77777', {254, 24992}
  </code></pre>
  
  <p>Any suggestions as to how can I achieve this?</p>
  
  <hr>
  
  <pre><code>-- Individual Aggregations
  local dictionary = ?
  
  -- Other Vars
  local sumCount = 0
  local sumSize = 0
  local matches = redis.call(KEYS, query)
  
  for _,key in ipairs(matches) do
      local val = redis.call(GET, key)
      local count, size = val:match(([^:]+):([^:]+))
  
      topUsers(string.sub(key, 11, 15), sumCount, sumSize)
  
      -- Global Count and Size for the Query
      sumCount = sumCount + tonumber(count)
      sumSize = sumSize + tonumber(size)
  end
  
  local result = string.format(%s:%s, sumCount, sumSize)
  return result;
  
  -- Users Total Data Aggregations
  function topUsers()
    -- Do sums for each user
  end
  </code></pre>