Code:
$.each(array, function (idx, item)
{
var layout1 = [];
$.each(item, function (idx2, item2)
{
layout1.splice(layout1.length, 0, item2);
});
searchData.push(layout1);
});
I want to overwrite(=update/correction elements) elements from the 0th Row to the 3rd Row.
The code below is a push, so it is added to the end.
I want to overwrite(=update/correction elements) elements from the 0th row to the 3rd Row.
*Caution
Paste :::::: The original array is 7 rows and 5 columns.
(0,0) (0,1) (0,2) (0,3) (0,4) (0,5)
(1,0) (1,1) (1,2) (1,3) (1,4) (1,5)
(2,0) (2,1) (2,2) (2,3) (2,4) (2,5)
(3,0) (3,1) (3,2) (3,3) (3,4) (3,5)
(4,0) (4,1) (4,2) (4,3) (4,4) (4,5)
(5,0) (5,1) (5,2) (5,3) (5,4) (5,5)
(6,0) (6,1) (6,2) (6,3) (6,4) (6,5)
Copy :::::: The copy array is 3 rows and 5 columns.
(0,0) (0,1) (0,2) (0,3) (0,4) (0,5)
(1,0) (1,1) (1,2) (1,3) (1,4) (1,5)
(2,0) (2,1) (2,2) (2,3) (2,4) (2,5)
Code:
$.each(array, function (idx, item)
{
var layout1 = [];
$.each(item, function (idx2, item2)
{
searchData.splice(idx2, 1, item2);
});
});
Last edited: