Lua has no concept of a "document line".
All Lua objects are tables (or user data, but you cannot check user data from Lua code. Well, not in Lua 5.1, in 5.2 you can do this if the user who created the user data wants you). Therefore, you can simply use existing table methods to iterate over the contents of the table:
for k, v in pairs(obj) do
--Do stuff with k(ey) and v(alue)
end
, , . , , , , , .