passing structured data to php via post
===

Suppose I have the following data:
<pre>

    var arr = [], arr1 = [], arr2 = [], arr3 = [], arr4 = [];
    var a = 'something', b = 'else';
    arr1['key1-1'] = 'value1-2';
    arr1['key1-2'] = 'value1-2';
    for (var i = 0; i < someCond; i++){<br/>
        arr = [];
        arr['key2-1'] = 'value2-1';
        arr['key2-2'] = 'value2-2';
        arr2.push(arr);
    }

</pre>

Now I need to pass the hole of it to a php script.

I packaged it into a single variable like so:
<pre>

    var postVar = {
        a: a,
        b: b,
        arr1: arr1,
        arr2: arr2
    };

</pre>

I'm using jQuery so I tried to post it like this:
<pre>

    //Works fine for a and b, not for the arrays
    $.post('ajax.php', postVar, function(response){});

</pre>

and this:
<pre>

    var postVar = JSON.stringify(postVar);
    $.post('ajax.php', {json: postVar}, function(response){});

</pre>
with the php file
<pre>

    $req = json_decode(stripslashes($_POST['json']), true);

</pre>

which also doesn't work.

How should I structure/format my data as to send it to PHP?

Thanks