Simply use str.split(',')
var str = "Volvo,Saab,Mercades,Audi";
var arr = str.split(',');
console.log(arr);
2
solved How do I change the array string into an array of objects in javascript?
Simply use str.split(',')
var str = "Volvo,Saab,Mercades,Audi";
var arr = str.split(',');
console.log(arr);
2
solved How do I change the array string into an array of objects in javascript?