Obviously, this is not allowed in javascript:
for (var i=0; i<data.length; i++){
array[i].push(data[i].name);
}
Does anyone know of a workaround that does the same thing?
You can do
for (var i=0; i<data.length; i++){
array[i] = [];
array[i].push(data[i].name);
}
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments