handlebar not populating template correctly for JSON response
<p>Hi I am making http get call to mvc controller action which returns JSON as below:</p>

<pre><code>[
    {
        "PlanCode": "P001 ",
        "PlanName": "Plan1 "
    },
    {
        "PlanCode": "P002$ ",
        "PlanName": "Plan2$ "
    },
    {
        "PlanCode": "P003$ ",
        "PlanName": "Plan3$ "
    },
    {
        "PlanCode": "P004$ ",
        "PlanName": "Plan4$ "
    },
    {
        "PlanCode": "P005$ ",
        "PlanName": "Plan5$ "
    },
    {
        "PlanCode": "P006$ ",
        "PlanName": "Plan6$ "
    },
    {
        "PlanCode": "P007$ ",
        "PlanName": "Plan7$ "
    },
    {
        "PlanCode": "P007$ ",
        "PlanName": "Plan7$ "
    },
    {
        "PlanCode": "P008$ ",
        "PlanName": "Plan8$ "
    },
    {
        "PlanCode": "P009$ ",
        "PlanName": "Plan9$ "
    }
]
</code></pre>

<p>Using handlbar code as below:</p>

<pre><code>var PLAN_METHOD = {

    handlerData: function (planJSON) {

        var templateSource = $("#plan-template").html();

        template = Handlebars.compile(templateSource);

           var context = planJSON;
            plansHTML = template({planJSON:context});


        $('#plans-div').html(plansHTML);

    },
    loadPlansData: function () {

        $.get("http://localhost:41801/plan/getplans",null,this.handlerData)

    }
};

$(document).ready(function () { 

    PLAN_METHOD.loadPlansData();
});
</code></pre>

<p>template html is as below:</p>

<pre><code>&lt;div id="plans-div" &gt;
&lt;/div&gt;

&lt;script id="plan-template" type="text/x-handlebars-template"&gt;
    &lt;table &gt;
        &lt;thead&gt;
            &lt;tr&gt;
                &lt;th&gt;Plan Code&lt;/th&gt;
                &lt;th&gt;Plan Name&lt;/th&gt;

            &lt;/tr&gt;
        &lt;/thead&gt;
        &lt;tbody&gt;
            {{#each Plans}}
            &lt;tr&gt;
                &lt;td&gt;{{this.PlanCode}}&lt;/td&gt;
                &lt;td&gt;{{this.PlanName}}&lt;/td&gt;
            &lt;/tr&gt;
            {{/each}}
        &lt;/tbody&gt;
    &lt;/table&gt;
&lt;/script&gt;
</code></pre>

<p>Somehow 'plansHTML' in handlebar javascript code is not getting populated with JSON date rows. Please help</p>