How to get JSON object from Razor Model object in javascript

前端 未结 5 1800
遇见更好的自我
遇见更好的自我 2020-12-02 08:09

In viewmodel object, below is the property:

  public IList CollegeInformationlist { get; set; }

In VIEW, javas

5条回答
  •  醉酒成梦
    2020-12-02 08:45

    After use codevar json = @Html.Raw(Json.Encode(@Model.CollegeInformationlist));

    You need use JSON.parse(JSON.stringify(json));

提交回复
热议问题