Module:Sandbox/Vestrian24Bio/JSON table

local cjson = require "cjson"

-- Function to convert JSON table to HTML table local function jsonToHtmlTable(jsonStr) local jsonTable = cjson.decode(jsonStr) local html = " \n" html = html .. " \n" else html = html .. " " .. tostring(value) .. " \n" end html = html .. " \n" end end

generateRows(jsonTable) html = html .. " \n" return html end

-- Example JSON string local jsonStr = {    "name": "John",    "age": 30,    "address": {        "street": "123 Main St",        "city": "Anytown"    },    "phones": ["123-4567", "987-6543"] }

-- Convert JSON to HTML table local htmlTable = jsonToHtmlTable(jsonStr) print(htmlTable)