JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://rawgithub.com/wycats/handlebars.js/master/dist/handlebars.js"></script>
<script type="text/template" id="template">
    {{#each data}}  
        <h1>{{../subpage}}</h1>

        {{#if this.brand}}
            {{#if ../../subpage}}
                <h1>This shows now!</h1>
            {{/if}}    
        {{/if}}  
    {{/each}}
</script>

<div id="output"></div>

JavaScript

var context = {
    data: [
        {
            brand: "Brand A",
            otherFields: "here"
        }
    ],
    subpage: false
};

var source = $('#template').text();
var template = Handlebars.compile(source);

var html = template(context);

$('#output').html(html);