title: How to return Json object from MVC controller to view
body: <p>I am doing an MVC application where i need to pass json object from controller to view.</p>
  
  <pre><code>var dictionary = listLocation.ToDictionary(x =&gt; x.label, x =&gt; x.value);
  return Json(new { values = listLocation}, JsonRequestBehavior.AllowGet);
  </code></pre>
  
  <p>The above code i  am using in my controller , now when i deploy the view page its opening a download dialog in my browser , when  open the file it gives me json object as i needed format. </p>
  
  <p>Now i want to return my view page also want to access the json object in the view page. how can i do that.</p>