Postgres Query Json Array Length Lua