JSFiddle - React, Tailwind, and code Playground
by KevinGabbert
HTML
<script id="template" type="text/x-jQuery-tmpl">
<tr>
<td>${field2}</td>
</tr>
</script>
<table id="table1">
<thead>
<tr>
<th>field1</th>
<th>field2</th>
</tr>
</thead>
</table>
JavaScript
var data = [
{
field1: "yayayaya1",
field2: "oyoyoyo1"},
{
field1: "yayayaya2",
field2: "hello"},
{
field1: "yayayaya3",
field2: "oyoyoyo3"}
];
$(function() {
$("#template").tmpl(data).appendTo("#table1");
});