Forum Discussion

arvindnsn's avatar
arvindnsn
Contributor
3 years ago
Solved

Add single quotes in comma separated string

Hello,

I have a scenario where the location name will come in 2 different scenarios from an API as mentioned below.

  1. LOC1
  2. LOC1, LOC2, LOC3

The expected output should be

  1. ‘LOC1’
  2. ‘LOC1’, ‘LOC2’, ‘LOC3’

I tried using the split and replace function but in vain. Appreciate any help provided here

Thanks
Aravind N