Ticket #10541 (closed enhancement: plugin)
jQuery.map should not flatten out result array.
|Reported by:||kausikram@…||Owned by:|
jQuery.map has a behaviour of flattening out the result. this behaviour of jQuery.map is highly confusing while working with nested arrays and the work around for it (by making the return of the callback a single item array is hacky to say the least)
it would be helpful if jQuery.map takes an optional argument to override this default behaviour and return a nested array, if this parameter is set.
Example and test cases : http://jsfiddle.net/tNYPQ/