Module:ProfessionList: Difference between revisions
no edit summary
mNo edit summary |
No edit summary |
||
Line 72:
for _, page in ipairs(pages) do
-- first iterate through activities
if page.activityJSON ~= nil then
if type(page.activityJSON)=='string' then
local item = mw.text.jsonDecode(JSON)
json.type = 'activity'▼
item.page = page.pageName
table.insert(JSONs,json)▼
item.pageImage = page.pageImage
end
end
-- same iteration through recipes
if page.recipeJSON ~= nil then
if type(page.recipeJSON)=='string' then
for _, json in page.recipeJSON do▼
json.type = 'recipe'▼
end
local item = mw.text.jsonDecode(JSON)
item.page = page.pageName
item.pageImage = page.pageImage
table.insert(output,item)
end
end
end
|