I am trying to convert CSV to JSON in angularjs, but I am unable to.
Here is the raw data, I receive from API -
"sentby: Sanjay, sitename: Flipkart, PinCode: 080, stdnumber: 56477382, website: https://flipkart.com, status: Done".
I want to convert this to JSON
let res = {};str.split(', ').forEach(s=>{let t = s.split(': '); res[t[0]] = t[1];});