title: Best way to parse URL string to get values for keys?
body: <p>I need to parse a URL string like this one:</p>
  
  <pre><code>&amp;ad_eurl=http://www.youtube.com/video/4bL4FI1Gz6s&amp;hl=it_IT&amp;iv_logging_level=3&amp;ad_flags=0&amp;endscreen_module=http://s.ytimg.com/yt/swfbin/endscreen-vfl6o3XZn.swf&amp;cid=241&amp;cust_gender=1&amp;avg_rating=4.82280613104
  </code></pre>
  
  <p>I need to split the NSString up into the signle parts like <code>cid=241</code> and <code>&amp;avg_rating=4.82280613104</code>. I've been doing this with <code>substringWithRange:</code> but the values return in a random order, so that messes it up. Is there any class that allows easy parsing where you can basically convert it to NSDictionary to be able to read the value for a key (for example ValueForKey:<code>cid</code> should return <code>241</code>). Or is there just another easier way to parse it than using <code>NSMakeRange</code> to get a substring?</p>