Skip to content

Instantly share code, notes, and snippets.

@PedroAlvesV
Created January 20, 2020 07:25
Show Gist options
  • Save PedroAlvesV/fa38ec07a038deb9ed0bfe118fb6627a to your computer and use it in GitHub Desktop.
Save PedroAlvesV/fa38ec07a038deb9ed0bfe118fb6627a to your computer and use it in GitHub Desktop.
local function print_table(t, level)
level = level or 0
local tab = ""
for i=1, level do
tab = tab.."\t"
end
for k,v in pairs(t) do
if type(v)=="table" then
print(tab..k)
print_table(v, level+1)
else
print(tab..k.." "..v)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment