I am trying to pass a nested array to an asp.net mvc controller like this:
var subgroups = [];
subgroups [0] = [[\"A\", \"Y\"],
[\"B\", \"Y\"],
in file "code.jquery.com/jquery-1.4.2.js" in line 5290:
buildParams( prefix + "[" + ( typeof v === "object" jQuery.isArray(v) ? i : "" ) + "]", v );
I change for this code:
buildParams(prefix + (typeof v === "object" jQuery.isArray(v) ? "[" + i + "]" : ""), v);
and the result was good. I could not test on many more cases.
I create a ticket in jQuery.com to see if this is a bug: Ticket #6900 (new bug)
but in:
public ContentResult Action(List<string[][]> subgroups) {
for this modification, you have to use this code:
public ContentResult Action(List<string[]> subgroups) {
In case anyone else stumbles on this question like I did but doesn't like the idea of modifying jQuery to work with your particular server software, I ended up using JSON.stringify() to pass a JSON string of nested arrays to the server, and then decoding that JSON string on the server.