Trying to convert comma-separated string to array w/ quotes around each value in js:
var ipd = 'field1,field2';
console.log('Img Pad string: ' + ipd); // field1,field2
var ipdarray = new Array();
ipdarray = ipd.split(',');
console.log('Img Pad array split: ' + typeof ipdarray); // object
console.log('Img Pad array: ' + ipdarray); // field1,field2
I want the array to be: ["field1","field2"]
Tried to follow this: Convert comma separated string to array but it's not converting to an array.