title: Jquery / Ajax success data list when displayed "undefined"
body: <p>I have a ajax code. This code taking a list from controller. But im taking &quot;undefined&quot; message when i display this.</p>
  <p>Ajax</p>
  <pre><code>           $.ajax(
             {
                 url: &quot;/Panel/OpenOrderDetail1&quot;,
                 type: 'GET',
                 data: { id: id},
                 dataType: 'json',
                 contentType: &quot;application/json; charset=utf-8&quot;,
                 success: function (data) {
                         for (var i = 0; i &lt; data.length; i++) {
                             satir += &quot;&lt;span&gt;&quot; + data[i].ProductId+ &quot;&lt;/span&gt;&lt;br&gt;&quot;;
                         }
                     }
                 },
             });
  
  </code></pre>
  <p>Controller (.net core)</p>
  <pre><code>[HttpGet]
         public JsonResult OpenOrderDetail1(int id)
         {
             // some codes....
             List&lt;OrderDetailViewModel&gt; orderList = new List&lt;OrderDetailViewModel&gt;();
             foreach (DataRow item in data.Rows)
             {
                 OrderDetailViewModel ovm = new OrderDetailViewModel();
                 //listing .........................
                 orderList.Add(ovm);
             }
             return Json(orderList);
         }
  </code></pre>
  <p>AND my class</p>
  <pre><code>public class OrderDetailViewModel
     {
         public decimal OrderId { get; set; }
         public string ProductCode { get; set; }
         public string? ProductName { get; set; }
         public decimal? OrderPrice { get; set; }
         public decimal? OrderAmount { get; set; }
         public decimal? OrderFPD { get; set; }
         public decimal? OrderKPD { get; set; }
         public decimal? OrderTotal { get; set; }
         public string? ProductExp { get; set; }
         public string? FinanceExp { get; set; }
         public decimal ProductId { get; set; }
         public decimal OrderLineId { get; set; }
     }
  </code></pre>
  <p><strong>NOT  : I can get the values. This is exact information. But I am getting &quot;undefined&quot; when listing.</strong></p>