title: Two-dimensional list inside Jquery Template
body: <p>Im having some trouble with Jquery Templates and can't seem to figure out what's wrong. It's probally the way I'm using an each inside an each (Couldn't find any good examples how to do this).</p>
  
  <p>The error appers when running the .tmpl function.</p>
  
  <pre><code>$("#calendarListTemplate").tmpl(json)
  </code></pre>
  
  <p>and says:</p>
  
  <p>Uncaught SyntaxError: Unexpected identifier at Line 1 of jquery.tmpl.min.js</p>
  
  <p>Here's the template:</p>
  
  <pre><code>&lt;script id="calendarListTemplate" type="text/x-jquery-tmpl"&gt;
  
      ${{each eventDayGroups}}
  
          &lt;li class="todaysEventDayListelement"&gt;
  
              ${{each ${data.eventDayList}}}
  
                  &lt;div id="eventDay" class="eventDay ${$data.eventDayClass}"&gt;
  
                      &lt;div class="day"&gt;
                          ${$data.dateDay}
                      &lt;/div&gt;
  
                      &lt;div class="monthYear"&gt;
                          ${$data.dateMonthYear}
                      &lt;/div&gt;
  
                      &lt;div id="eventCounter" class="eventCounter ${$data.counterClass}"&gt;
                          ${$data.count}
                      &lt;/div&gt;
  
                      &lt;div style="display:none" class="date"&gt;
                          ${$data.date}
                      &lt;/div&gt;
                  &lt;/div&gt;
  
              {{/each}}
  
          &lt;/li&gt;
  
      {{/each}}
  
  &lt;/script&gt;
  </code></pre>
  
  <p>And here's the JSON</p>
  
  <pre><code>{ "eventDayGroups" : [ { "eventDayList" : [ { "count" : 1,
            "counterClass" : "eventCountSingle",
            "date" : "27.08.2011",
            "dateDay" : "27",
            "dateMonthYear" : "Aug 2011",
            "eventDayClass" : ""
          },
          { "count" : 1,
            "counterClass" : "eventCountSingle",
            "date" : "28.08.2011",
            "dateDay" : "28",
            "dateMonthYear" : "Aug 2011",
            "eventDayClass" : ""
          },
          { "count" : 3,
            "counterClass" : "eventCountSingle",
            "date" : "29.08.2011",
            "dateDay" : "29",
            "dateMonthYear" : "Aug 2011",
            "eventDayClass" : ""
          },
          { "count" : 1,
            "counterClass" : "eventCountSingle",
            "date" : "30.08.2011",
            "dateDay" : "30",
            "dateMonthYear" : "Aug 2011",
            "eventDayClass" : ""
          },
          { "count" : 2,
            "counterClass" : "eventCountSingle",
            "date" : "31.08.2011",
            "dateDay" : "31",
            "dateMonthYear" : "Aug 2011",
            "eventDayClass" : ""
          },
          { "count" : 5,
            "counterClass" : "eventCountSingle",
            "date" : "01.09.2011",
            "dateDay" : "01",
            "dateMonthYear" : "Sep 2011",
            "eventDayClass" : ""
          },
          { "count" : 5,
            "counterClass" : "eventCountSingle",
            "date" : "02.09.2011",
            "dateDay" : "02",
            "dateMonthYear" : "Sep 2011",
            "eventDayClass" : ""
          },
          { "count" : 3,
            "counterClass" : "eventCountSingle",
            "date" : "03.09.2011",
            "dateDay" : "03",
            "dateMonthYear" : "Sep 2011",
            "eventDayClass" : ""
          },
          { "count" : 2,
            "counterClass" : "eventCountSingle",
            "date" : "04.09.2011",
            "dateDay" : "04",
            "dateMonthYear" : "Sep 2011",
            "eventDayClass" : ""
          }
        ] },
    { "eventDayList" : [ { "count" : 2,
            "counterClass" : "eventCountSingle",
            "date" : "05.09.2011",
            "dateDay" : "05",
            "dateMonthYear" : "Sep 2011",
            "eventDayClass" : ""
          },
          { "count" : 1,
            "counterClass" : "eventCountSingle",
            "date" : "06.09.2011",
            "dateDay" : "06",
            "dateMonthYear" : "Sep 2011",
            "eventDayClass" : ""
          },
          { "count" : 3,
            "counterClass" : "eventCountSingle",
            "date" : "07.09.2011",
            "dateDay" : "07",
            "dateMonthYear" : "Sep 2011",
            "eventDayClass" : ""
          },
          { "count" : 1,
            "counterClass" : "eventCountSingle",
            "date" : "08.09.2011",
            "dateDay" : "08",
            "dateMonthYear" : "Sep 2011",
            "eventDayClass" : ""
          },
          { "count" : 2,
            "counterClass" : "eventCountSingle",
            "date" : "09.09.2011",
            "dateDay" : "09",
            "dateMonthYear" : "Sep 2011",
            "eventDayClass" : ""
          },
          { "count" : 2,
            "counterClass" : "eventCountSingle",
            "date" : "10.09.2011",
            "dateDay" : "10",
            "dateMonthYear" : "Sep 2011",
            "eventDayClass" : ""
          },
          { "count" : 1,
            "counterClass" : "eventCountSingle",
            "date" : "11.09.2011",
            "dateDay" : "11",
            "dateMonthYear" : "Sep 2011",
            "eventDayClass" : ""
          },
          { "count" : 2,
            "counterClass" : "eventCountSingle",
            "date" : "12.09.2011",
            "dateDay" : "12",
            "dateMonthYear" : "Sep 2011",
            "eventDayClass" : ""
          },
          { "count" : 2,
            "counterClass" : "eventCountSingle",
            "date" : "13.09.2011",
            "dateDay" : "13",
            "dateMonthYear" : "Sep 2011",
            "eventDayClass" : ""
          }
        ] },
    { "eventDayList" : [ { "count" : 2,
            "counterClass" : "eventCountSingle",
            "date" : "14.09.2011",
            "dateDay" : "14",
            "dateMonthYear" : "Sep 2011",
            "eventDayClass" : ""
          },
          { "count" : 1,
            "counterClass" : "eventCountSingle",
            "date" : "15.09.2011",
            "dateDay" : "15",
            "dateMonthYear" : "Sep 2011",
            "eventDayClass" : ""
          },
          { "count" : 3,
            "counterClass" : "eventCountSingle",
            "date" : "16.09.2011",
            "dateDay" : "16",
            "dateMonthYear" : "Sep 2011",
            "eventDayClass" : ""
          },
          { "count" : 1,
            "counterClass" : "eventCountSingle",
            "date" : "17.09.2011",
            "dateDay" : "17",
            "dateMonthYear" : "Sep 2011",
            "eventDayClass" : ""
          },
          { "count" : 1,
            "counterClass" : "eventCountSingle",
            "date" : "18.09.2011",
            "dateDay" : "18",
            "dateMonthYear" : "Sep 2011",
            "eventDayClass" : ""
          },
          { "count" : 3,
            "counterClass" : "eventCountSingle",
            "date" : "19.09.2011",
            "dateDay" : "19",
            "dateMonthYear" : "Sep 2011",
            "eventDayClass" : ""
          },
          { "count" : 1,
            "counterClass" : "eventCountSingle",
            "date" : "20.09.2011",
            "dateDay" : "20",
            "dateMonthYear" : "Sep 2011",
            "eventDayClass" : ""
          },
          { "count" : 2,
            "counterClass" : "eventCountSingle",
            "date" : "21.09.2011",
            "dateDay" : "21",
            "dateMonthYear" : "Sep 2011",
            "eventDayClass" : ""
          },
          { "count" : 2,
            "counterClass" : "eventCountSingle",
            "date" : "22.09.2011",
            "dateDay" : "22",
            "dateMonthYear" : "Sep 2011",
            "eventDayClass" : ""
          }
        ] }
  ] }
  </code></pre>