Module:GetJSON: Difference between revisions

From AlternateWiki
114 bytes added ,  10 days ago
no edit summary
No edit summary
No edit summary
Tag: Reverted
Line 7:
local m = {}
-- Load JSON data from the first argument passed to the module
m.root =if mw.loadJsonDatatitle.new(frame.args[1]).exists then
m.root = mw.text.jsonDecode(frame.args[1])
else
m.root = mw.loadJsonData(frame.args[1])
end
-- Function to split a key string by "."
local function splitKey(key)
Cookies help us deliver our services. By using our services, you agree to our use of cookies.