JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.js"></script>
<script type="text/x-jquery-tmpl" id="jqTemplate">
<ul>
{{each data.messagetext}}
<li>
Message # ${$index+1}: "${$value}" |
Test result: {{if $value}}value exists {{else}}value does not exist{{/if}}
</li>
{{/each}}
</ul>
</script>
<script type="text/javascript">
var json={
"data": {
"messagetext": [
"cool text",
"scnd text",
"haha text"
]
}
}
</script>
CSS
li{ border:1px solid grey; padding:4px;}
JavaScript
$( "#jqTemplate" ).tmpl( json ).appendTo( "body" )