Forum Discussion
Thank you for the additional information. I believe there was a typo in the initial post indicating that you could not use commas. If your JSON was something like “names” : “john, maria,lisa, awari,Arun, john(TCS)” you could use the expression $names.split(‘,’) which will result in a “names” array. If you want to remove the white space you could use $names.replaceAll(’ ‘,’‘).split(’,').
Screenshot of split only:
Screenshot of expression with replaceAll and split:
Hi,
I tried above solution, but i am getting output as below
.
but the excepted output will be combination of first name and last name (john, maria).
Any advice. Thanks
- cjhoward186 years agoEmployee
Hi @pranil2k2
Here is an expression that produces the results you are looking for:
$NAME.match(/[^,]+,[^,]+/g)
- pranil2k26 years agoContributor
HI,
Thanks for the information.
Anil