Subash Kumar

Subash Kumar

  • NA
  • 127
  • 8.4k

how to convert array to array list in typescript

Feb 20 2020 4:34 AM
hi all,
 
i need to convert  array into array list
 
while i'm trying im getting laset array only
  1. var week_name=[];  
  2. var week_val=[];  
  3. weeek.forEach(function (item) {  
  4. week_name=week_name.concat(item['WeekName'].split(','));  
  5. week_val =week_val.concat(item['value']);  
  6. week_val11=week_val;  
  7. });  
  8. fdata = {  
  9. labels: dbfileld,  
  10. datasets: [{  
  11. label: "week_name",  
  12. backgroundColor: 'rgba(16, 172, 132)',  
  13. data: week_val11  
  14. }]  
  15. };  
  16. });  
  17. console.log(fdata); 

Answers (2)