Module:JohnnyTOS/5

local p = {} function p.test1( frame ) local skillcatdata = mw.loadData("Module:SkillCatData")

local tabbercat = '1' --tostring(frame.args[1])

cat = { ['1'] = {100, 200},       ['2'] = {200, 300},        ['3'] = {300, 400},        ['4'] = {400, 500},        ['5'] = {500, 600},        ['6'] = {600, 700}    }

outputArray = {} for _, v in ipairs(skillcatdata) do       if tonumber(v.catid) >= cat[tabbercat][1] and tonumber(v.catid) < cat[tabbercat][2] then table.insert(outputArray, frame:expandTemplate{ title = 'SearchOption', args = { 'skillcatid', v.catid, v.desc } }) end end return table.concat(outputArray) end return p