Setting an object to a split array
<p>I'm not a javascript guru.  I've got the following code below:</p>

<pre><code>var aCookieValues = sCookieContentString.split('&amp;'); // split out each set of key/value pairs
var aCookieNameValuePairs = aCookieValues.split('='); // return an array of each key/value
</code></pre>

<p>What  I'm trying to do is split the first string via &amp; and then create another array that takes the first array and splits it further via the = character that exists in every value in the aCookieValues array</p>

<p>I get the error aCookieValues.split is not a function.</p>

<p>I've seen an example that basically does the same thing but the second time this guy is using a loop:</p>

<p>(http://seattlesoftware.wordpress.com/2008/01/16/javascript-query-string/)</p>

<pre><code>    // '&amp;' seperates key/value pairs
    var pairs = querystring.split("&amp;");

    // Load the key/values of the return collection  
    for (var i = 0; i &lt; pairs.length; i++) {
        var keyValuePair = pairs[i].split("=");
        queryStringDictionary[keyValuePair[0]] = keyValuePair[1];
    }
</code></pre>

<p>Ultimately what I'm trying to achieve here is a final dictionary with key/value pairs based off the '=' split.  I'm simply trying to split up a cookie's values and shove it into a nice dictionary so I can then get certain values out of that dictionary later on.</p>
