title: Use a dictionary type in Javascript [Ajax]
body: <p>I am building an ASP.NET MVC application It currently has a button that once clicked does an Ajax call to the controller as so:</p>
  
  <pre><code>function getData() {
      $.ajax({
          url: "/Home/GetData/",
          type: "POST",
          contentType: 'application/json',
          success: function (data){
              //need to do stuff here
          }
      });
  }
  </code></pre>
  
  <p>The controller then initializes a class, converts it to XML and then converts that to the following dictionary (There is a reason for this):</p>
  
  <pre><code>public ActionResult GetData()
      {
          List&lt;People&gt; peeps = GetPeeps();
  
          string xml = ToXml(peeps);
          Dictionary&lt;string,List&lt;string&gt;&gt; stuff = ToDictionary(xml);
  
          return Json(stuff);
      }
  </code></pre>
  
  <p>I would like to be able to 'Do stuff' with this data client side with javascript. </p>
  
  <p>The APIs I have to work with Server side return XML data.
  The APIs I have to work with Client side require string arrays. (Hence the conversions)</p>
  
  <p>Is there a way to use the dictionary i've defined above client side? Could someone perhaps expand from this (if possible) to add to the ajax call a small method that prints the contents of the dictionary to a message box? just to give me a starting point from how to use the dictionary in javascript.</p>
  
  <p>Thanks in advance</p>