Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR LUA

Lua how to get the index of a nested table

function findTL(tbl)
    for key, data in pairs(tbl) do
       if data.tl == tlSearch then 
          return key
       end
    end
end

local key = findTL(objects, 22)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Lua #index #nested #table
ADD COMMENT
Topic
Name
1+8 =