local cjson = require "cjson"
-- Function to convert JSON table to HTML tablelocal function jsonToHtmlTable(jsonStr) local jsonTable = cjson.decode(jsonStr) local html = "
" .. tostring(key) .. " | \n" html = html .. " |
generateRows(jsonTable) html = html .. "\n" return htmlend
-- Example JSON stringlocal jsonStr =
-- Convert JSON to HTML tablelocal htmlTable = jsonToHtmlTable(jsonStr)print(htmlTable)