I have a string of comma separated values. As below:
var myValues = "Ip1, Ip2, Ip3";
I want to convert this to a custom object. The result should be:
{
Input: 'Ip1',
Output: 'Ip1_Updated'
},
{
Input: 'Ip2',
Output: 'Ip2_Updated'
},
{
Input: 'Ip3',
Output: 'Ip3_Updated'
}
What is the best way to approach this. Can I split on "," and then loop through the string and create custom array