1var lab =["1","2","3"];
2var val = [42,55,51,22];
3var data = [];
4for(var i=0; i<4; i++) {
5 data.push({label: lab[i], value: val[i]});
6}
7Or an other, less concise way, but closer to your original code:
8
9for(var i=0; i<4; i++) {
10 data[i] = {}; // creates a new object
11 data[i].label = lab[i];
12 data[i].value = val[i];
13}