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