How to read 1 single string A|B|C|D from Launch and split into 4 entries in evar | Community
Skip to main content
Luca_Lattarini
Level 9
Dec 16, 2020 7:30 AM UTC
Solved

How to read 1 single string A|B|C|D from Launch and split into 4 entries in evar

Hello everyone,

 

How can I split this single string A|B|C|D from Launch into 4 differents entries?

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
yuhuisg
yuhuisgAccepted solution
New Participant
Dec 16, 2020 2:05 PM UTC

The simplest is with custom code:

 

var str = "A|B|C|D"; var values = str.split("|"); // values = ["A", "B", "C", "D"]

 

 

11 replies

yuhuisg
New Participant
Dec 16, 2020 2:07 PM UTC

--

Translate
Luca_Lattarini
Level 9
Jan 7, 2021 1:47 AM UTC
@yuhuisg, It works well, If I use List Variable but I have an import data from API 1.4 where I dont use List Variable. Can I use List Variable from API?
Translate
yuhuisg
yuhuisgAccepted solution
New Participant
Dec 16, 2020 2:05 PM UTC

The simplest is with custom code:

 

var str = "A|B|C|D"; var values = str.split("|"); // values = ["A", "B", "C", "D"]

 

 

Translate
Luca_Lattarini
Level 9
Dec 17, 2020 12:56 AM UTC

Hi yuhui, AA receives this string "A|B|C|D" via API. I would like to store in evar X (AA) A, B, C D as single entry not as string

Translate