title: How to use KeyValue pair structure in view
body: <p>How to use KeyValue pairs (stored in ViewBag/ViewData) in javascript. I Need a KeyValue pair structure say a dictionary from a controller to use in view.</p>
  
  <pre><code>ViewBag.ContactTypes = new Dictionary&lt;string,string&gt;
                  {
                      {"Home", "5"},
                      {"Cell", "6"},
                      {"Work", "7"},
                      {"Fax", "8"},
                      {"Other", "9"},
                  };
  </code></pre>
  
  <p>&amp; I want to access These dictionary values through key like: </p>
  
  <pre><code>ViewBag.ContactTypes["Home"]
  </code></pre>
  
  <p>How to achieve this goal, any idea?</p>