Jquery - JSON.stringify, array is empty
<p>i hope somebody can help me, the array value is empty in the post. </p>

<pre><code>$(function start() {

    c_all = new Array('#div { font-color:#ff0000; border:1px solid #00ff00; }', '#div_2 { font-color:#ff0000; }', '.line2 { font-color:#00ffff; }');

    css(c_all);

});


function css(x) {

    values = new Array();

    for (i = 0; i &lt; x.length; i++) {
        c0_selector = '' + x[i].match(/^.*{/) + '';
        c0_selector = c0_selector.replace(/\s*/g, '');
        c0_selector = c0_selector.replace(/{/, '');

        x[i] = x[i].replace(/^.*{/, '');
        x[i] = x[i].replace(/}/, '');

        c0_arr = x[i].split(';');

        values['' + c0_selector + ''] = new Array();

        $('#log').append(''+c0_selector+'&lt;br /&gt;');

        for (i2 = 0; i2 &lt; c0_arr.length; i2++)
        {
            values[''+c0_selector+''][i2] = c0_arr[i2].split(':');
            $('#log').append(''+c0_arr[i2]+'&lt;br /&gt;');  
        }

    }

    $.ajax({
            type: 'post',
            data: JSON.stringify(values),
            contentType: 'application/json',
            dataType: 'json'
    });


}
</code></pre>

<p>working example -> <a href="http://www.jsfiddle.net/V9Euk/448/">http://www.jsfiddle.net/V9Euk/448/</a></p>

<p>Thanks in advance!
Peter</p>
