title: Call JsonResult property from model in view of asp.net mvc
body: <p>I have one class :</p>
  
  <pre><code>public class ShoppingCartVM
  {
     public JsonResult CartRelatedItems { get; set; }
  }
  </code></pre>
  
  <p>And a model that return </p>
  
  <pre><code>return new JsonResult
  {
     Data = listItem,
     JsonRequestBehavior = JsonRequestBehavior.AllowGet, 
  };
  </code></pre>
  
  <p>In controller, I assign the value the propery <code>ShoppingCartVM</code> of the <code>ShoppingCartVM</code> object.</p>
  
  <pre><code>  public ActionResult Index()
    {
       var _relatedItem = qm.GetRelatedItemCart((
                                    HttpContext.User.Identity.IsAuthenticated ?
                                    qm.GetCustomer(HttpContext.User.Identity.Name).PriceLevel.Value : 0
                                 ));
       ShoppingCartVM scvm = new ShoppingCartVM()
       {
           CartRelatedItems = _relatedItem
       }
       return View(scvm);
    }
  </code></pre>
  
  <p>Could anyone tell me, how can I loop the property <code>CartRelatedItems</code> to display by ajax in the View of my asp.net mvc project.</p>
  
  <p>Thanks you so much.</p>