Module:HeroData: Difference between revisions

Jump to navigation Jump to search
Sur (talk | contribs)
m rename to be prefixed with p
Sur (talk | contribs)
m formatting test
Line 13: Line 13:


-- returns the table of a specific item
-- returns the table of a specific item
p.pget_json_item = function(frame)
function p.pget_json_item(name)
local name = frame.args[1]
if (name == nil) then return "Name parameter missing" end
for i,v in pairs(data) do
for i,v in pairs(data) do
if (v["Name"] == name) then
if (v["Name"] == name) then