Module:ItemTables: Difference between revisions

Jump to navigation Jump to search
table is string
check the table with property
Line 20: Line 20:
local item = get_json_item(item_name)
local item = get_json_item(item_name)
if(item == nil) then return "Item Not Found" end
if(item == nil) then return "Item Not Found" end
if(type(item) == "table") then
if(type(item[property]) == table) then
for i,v in pairs(item) do
for i,v in pairs(item[property]) do
local shopTableValues = table.insert(shopTableValues, v)
local shopTableValues = table.insert(shopTableValues, v)
--local tableValues = get_json_item(item)
--local tableValues = get_json_item(item)