I possess an array:
set
Array
(
[0] => Array
(
[name0] => J
[name1] => L
[name2] => C
)
[1] => Array
(
[data0] => 3,1,3
[data1] => 5,3,2
[Nu0] => 3,0,0
[Nu1] => 1,1,1
)
)
It is necessary for me to transfer the data into another array
this.datas.push({'name':'A','data':(data[1].data0).'color':'#00000'});
this.datas.push({'name':'C','data':(data[1].Nu0).'color':'#00000'});
this.datas.push({'name':'B','data':(data[1].data1).'color':'#FFFFF'});
this.datas.push({'name':'D','data':(data[1].Nu1).'color':'#FFFFF'});
this.namedatas.push(data[0].name0);
this.namedatas.push(data[0].name1);
What is the method to employ a loop function? Additionally, how should I proceed if there are additional datasets?