$.mapで入れ子になったの配列の配列がほしいときは[]でくくって返す。
var count1 = 5, count2 = 5, array1 = [];
array1[count1 - 1] = undefined;
$.map(array1, function (v, i) {
var t = [];t[count2 - 1] = undefined;
return $.map(t, function (v, f) { return f });
});
//->[0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1,
2, 3, 4]
var count1 = 5, count2 = 5, array1 = [];
array1[count1 - 1] = undefined;
$.map(array1, function (v, i) {
var t = [];t[count2 - 1] = undefined;
return [$.map(t, function (v, f) { return f })];
});
//->[[0, 1, 2, 2 more...], [0, 1, 2, 2 more...], [0, 1, 2, 2 more...],
[0, 1, 2, 2 more...], [0, 1, 2, 2 more...]]