title: Access Model object in jQuery
body: <p>I have a Model, <code>Customers</code>, in which I have a list property, <code>PayHistory</code>. I need to bind the table with the <code>PayHistory</code> object using jQuery in my ASP.NET MVC (C#) application.</p>
  
  <p>I am binding the table using jQuery as:</p>
  
  <pre><code>&lt;table width="100%" border="0" cellpadding="0" cellspacing="0"&gt;
      &lt;tr&gt;
          &lt;td&gt;
              &lt;div id="PaidDate"&gt;
              &lt;/div&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;div id="PaidAmt"&gt;
              &lt;/div&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  
  &lt;script type="text/javascript" language="javascript"&gt;
      $(document).ready(function() {
        //Initialize the dynamic Value;
        _dynId = 1;
        var data= '&lt;%= Model.PayHistory %&gt;';
         if (data != null) {
              for (i in data) {
                  var pay= data[i];
                  $('#PaidDate').append('&lt;div id="PaidDate' + _dynId  + '" style="height:20px;padding-left:10px;"&gt;' + '&lt;label&gt;' + pay.paidDate+ '&lt;/label&gt;');
                  $('#PaidAmt').append('&lt;div id="PaidAmt' + _dynId  + '" style="height:20px;padding-left:10px;"&gt;' + '&lt;label&gt;' + pay.PaidAmount + '&lt;/label&gt;');
                  _dynId   += 1;
              }
          }
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>In the above HTML, I am trying to access the list object <code>PayHistory</code> in jQuery, but it gives the type of the object.</p>
  
  <p>How can I access the object in jQuery to bind the table as in the HTML given above?</p>