use model in javascript code example Example: model to js var objModel =@Html.Raw(Json.Serialize(Model));