tags:

views:

17

answers:

1

code: http://jsfiddle.net/WRppV/4/

I should get something like

"content"=>
    ["141", ["203", "206", "204", "205"],
     "142", ["215", "207"]]

but i get

  Parameters: {"action"=>"sort_contents", "content"=>"207,215", "controller"=>"contents"}

Which are the last two values in the array.... I should be getting everything shouldn't I?

A: 

The problem is with the jQuery.param function which gets called to parse the data option with jQuery.ajax. Looks like from the jsFiddle that you are using jQuery 1.3.2. In 1.3.2 the jQuery.param function didn't handle deep objects like you are creating here. In 1.4 jQuery.param was updated to handle deep object.

Try upgrading to 1.4 and it should help.

PetersenDidIt