Jump to content

Module:SongContestData

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by TheThomanski (talk | contribs) at 14:40, 8 March 2025 (Created page with 'local getArgs = require('Module:Arguments').getArgs local p = {} function p.main(f) local args = getArgs(f) local contest = args[1] local year = args[2] local entry = args[3] local attribute = args[4] local contest = mw.loadData('Module:SongContestData/'..contest..'/'..year) local result = "" for k, v in pairs(contest[entry]) do if (k == attribute) then result = v break end end return result end return p'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

local getArgs = require('Module:Arguments').getArgs
local p = {}

function p.main(f)
	local args = getArgs(f)
	
	local contest   = args[1]
	local year      = args[2]
	local entry     = args[3]
	local attribute = args[4]
	
	local contest = mw.loadData('Module:SongContestData/'..contest..'/'..year)

    local result = ""
	for k, v in pairs(contest[entry]) do
		if (k == attribute) then
			result = v
			break
		end
	end
	return result
end

return p