Hi i want to display the list of values in the view. I used ajax post function and i'm able to pass the values from the controller to view.
When i tried to access those values, it is not showing up.
Here is my model:
public IEnumerable<LoanStatusHistory> LoanHistory { get; set; }
My Controller:
public ActionResult ChangeTimeZone(int id, int loanId)
        {
            LoanInfoResultModel model = new LoanInfoResultModel();
            LoanIdentifier loanIdentifier = new LoanIdentifier(1, loanId);
            model.LoanHistory = LoanTrackerServices.GetLoanStatusHistory(loanIdentifier);           
            return Json(model.LoanHistory.ToList(), JsonRequestBehavior.AllowGet);
        }
Here is my view
  $.getJSON('@Url.Action("ChangeTimeZone", "RegistrationPage")', { "id": a, "loanId":'@Model.LoanId.LoanId' },
                function (data) {
                    alert("HI");
                    console.log(data);
                    for (var i in data) {
                        //alert(this.data.LoanActivityDate);
                        alert(data[i]);
                    }
                    //$.each(data, function () {
                    //    //alert(data[0].LoanActivityDate);
                    //    alert(data["LoanActivityDate"]);
                    //});
});
i was unable to get the values from the data. Can anyone help me out of this.
 
    