function generateHTMLTableFromJSONArray as c (data as c ) if eval_mode_get() = "Sizeof" then generateHTMLTableFromJSONArray = "sizing" exit function end if dim css as c = <<%str% %str% dim p as p p = json_parse(data) dim i as n dim count as n = p.size() dim props as c = properties_enum(p[1]) dim data as c data = "" dim ph as p for each pn in props dotvarset(ph,pn.value,pn.value) next dim head as c = "" + getRowHTML(ph,props,"header") + "" data = head for i = 1 to count data = data + "" + getRowHTML(p[i],props,"data") + "" next i data = "" + data + "
" generateHTMLTableFromJSONArray = css + "
" + data + "
" end function function getRowHTML as c (data as p, props as c, className as c ) dim html as c for each pn in props if className = "" then html = html + "" + dotvarget(data,pn.value) + "" + crlf() else html = html + "" + dotvarget(data,pn.value) + "" + crlf() end if next html = alltrim(html) getRowHTMl = html end function