When I run this code through redis EVAL it return no results. Any idea why this is not working?
redis-cli EVAL \"$(cat bug.lua)\" 0
Answer from @deltheil is valid.
Remember though that you can use cjson library to pack tables and pass them to consumers.
Your lua file:
local retv = {"This", "is", "a", "bug" }
retv["test"] = 1000
return cjson.encode(retv)
Command:
redis-cli EVAL "$(cat bug.lua)" 0
Result:
"{\"1\":\"This\",\"2\":\"is\",\"3\":\"a\",\"4\":\"bug\",\"test\":1000}"