title: Parsing an array of string to MVC method
body: <p>Im trying to parse a simple array of guids/strings to json
  the json is used as a parameter on a post call to my controller.</p>
  
  <p>I have been trying a lot of different things but i simply cant make the controller method see my List.</p>
  
  <p>The array is built from checkbox values:</p>
  
  <pre><code>$('input:checkbox').click(function () {
          if ($(this).attr("checked") == true) {
              selected.push($(this).val());
          }
      });
  </code></pre>
  
  <p>and looks alright.
  then i try to convert it to JSON</p>
  
  <pre><code>$(document).ready(function () {
      $('#Summarize').click(function () {
          var arrayJson = {};
          for (i in selected) {
              arrayJson[i] = selected[i];
          }
          var json = {
              SelectedQuantities: arrayJson
          };
  
          $.ajax({
              url: "/MVC/Physical/SelectQuantities/@Model.TopID",
              type: "POST",
              data: JSON.stringify(json),
              dataType: "json",
              contentType: 'application/json',
              success: function (result) {
                  debugger;
                  if (result.status == 200)
                      location.replace = "/MVC/Physical/QuantitySummaryView/@Model.TopID"
                  else {
                      //Handle error
                  }
  
              }
          });
      });
  });
  </code></pre>
  
  <p>My controller method looks as following:</p>
  
  <pre><code>public ActionResult QuantitySummaryView(Guid id, List&lt;String&gt; SelectedQuantities)
  </code></pre>
  
  <p>But the list is always null. I figured it was because the JSON list doesnt contain the array of GUIDs directly underneath it. </p>
  
  <p>Can you help me get it nudged in place?</p>
  
  <p>JSON (as seen by Chromes  dev tools) looks as following:</p>
  
  <pre><code>{
  "SelectedQuantities": {
      "0": "707c40bd-4434-41ed-80fd-4ac541a81e85",
      "1": "a8d78a4b-b107-4e1c-97b5-5d8abf530ba8",
      "2": "a19226cc-9b22-4174-97e3-bb003d4b2746"
  }
  </code></pre>
  
  <p>}</p>