JavaScript - Separating the multi-value result of a field with commas -


i have field returns multiple values following way (in multiple rows):

field
role1
role2
role3

i want separate resultset commas. end result should role1, role2, role3

how achieve this? have tried split, string.replace(" ", ",") whitespace comma, nothing works.

thanks,

you can split on newline , join on comma:

str.split('\n').join(','); 

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -