Table of contents
No headers
var data = json.parse(page.properties[$id ?? 'data'].text ?? 'null');
if(data is not list) {
"Store is either empty or has the wrong type (type is " .. typeof(data) .. ")";
} else if(#data > 0) {
var keys = { (key): key foreach var row in data, var key in map.keys(row) };
<table cellpadding="3" cellspacing="0" border="1" width="80%">
<tr style="background-color: rgb(238, 238, 238);" >
foreach(var key in keys) {
<th> <strong> string.tocamelcase(key) </strong> </th>;
}
</tr>
foreach(var row in data) {
<tr>
foreach(var key in keys) {
<td> row[key] ?? string.nbsp </td>;
}
</tr>
}
</table>
} else {
"Store contains no data.";
}

Comments