title: Convert query string array parameters into dictionary value
body: <p>I'm trying to accept a query string of the form</p>
  
  <pre><code>?param[key1]=value1&amp;param[key2]=value2
  </code></pre>
  
  <p>or alternatively</p>
  
  <pre><code>?where[column1]=value1&amp;where[column2]=value1
  &amp;orderby[column1]=asc&amp;orderby[column2]=desc
  </code></pre>
  
  <p>and convert it into a Dictionary in C# MVC 4 Web API so it can be accessed as <code>param["key1"]</code>. This is trivial to do in PHP, but I haven't been able to find any method of reproducing this in C#.</p>
  
  <p>I know I can take an array via</p>
  
  <pre><code>?param=value1&amp;param=value2
  </code></pre>
  
  <p>so that I could do something like</p>
  
  <pre><code>?where=column1&amp;where=column2
  &amp;whereval=value1&amp;whereval=value2
  &amp;orderby=column1&amp;orderby=column2
  &amp;orderbycard=asc&amp;orderbycard=desc
  </code></pre>
  
  <p>but that leaves issues of ordering and isn't nearly as useful for my purposes.</p>
  
  <p>In the hopes that this isn't a limitation of the framework, how might I implement a dictionary-style conversion in C#, preferably so that I can take dictionaries in the parameters of functions?</p>
  
  <blockquote>
    <p>To clarify: I'm not looking to convert a query string into an NVC, but rather to convert query string parameters into their own NVCs. This is <em>NOT</em> as simple as ParseQueryString() or the Request.QueryString object.</p>
  </blockquote>
  
  <p><em><a href="https://stackoverflow.com/questions/14632829/convert-query-string-dictionary-or-associative-array-to-dictionary">This question</a> was closed last time on the grounds of being a duplicate of <a href="https://stackoverflow.com/questions/68624/how-to-parse-a-query-string-into-a-namevaluecollection-in-net">this question</a>, so I've added clarification. I'd ask that anyone considering marking this as a duplicate consider what I'm asking here before doing so, as well as taking a serious look at my examples.</em></p>