I have the following json object:
{"keywords": "foo", "industries":"1,37","contractTypes":"1"}
How can i convert the following key values in to an array as follows:
{"keywords": "foo", "industries": ["1", "37"], "contractTypes": ["1"]}
So basically I want to loop through the object and if property industries and contractTypes exist and not empty then convert the values into array.
keywordsis not in an array but value forcontractTypesis?