Module:Read award recognition
-- @param string jsonstr
-- @todo: use new Lua function that comes with WSSlots (available since Feb)
local p = {}
function p.main ( frame )
local jsonstr = frame.args['jsonstr']
local output = jsonstr
return output
end
function p.subobject( frame )
local jsonstr = frame.args['jsonstr'] or nil
if jsonstr == nil or jsonstr == "" then
return error("No JSON string found")
end
local jsondata = mw.text.jsonDecode( jsonstr )
local awardsTitle = jsondata["Title"]
local firstWinner = jsondata["Awards"][1]["winner"]
local winners = jsondata["Awards"]
end
-- return p
