title: How to pass model from view to javascript in asp.net MVC4
body: <p>I'm new to asp.net MVC4, please be patient.</p>
  
  <p>I have a controller which returns ActionResult with a model.
  I can use this model through Razor but I'd like to use it in JavaScript.
  this what I've tried to do according to some answers on the internet:</p>
  
  <pre><code>@{
  var property = Model;
  }
  var prop = @(property);
  var data= @Html.Raw(Json.Encode(prop ));
  </code></pre>
  
  <p>But it's not working.
  What do I need to do in order to pass my model to JavaScript?</p>