Hey!
I'm trying to build the following flow:
Input: WORKS
↓
JSON: WORKS
↓
Output NAME: Frontname Surname: DOESN'T WORK, HELP!
ADRESS: WORKS
i.e.
NAME: Katniss Mellark - Everdeen --> Kattnis Mellark
Adress: District 12
NAME: Peeta Mellark --> Peeta Mellark
Adress: District 12
So I'd like the second surname to disappear.
Can anyone help me out on how to do this please? I think I have to use if/else functions... but I don't know for sure...
Thanks!
Solved! Go to Solution.
Hello @Anonymous ,
if the second name is always after a - you can use the split(...) expression, split the string by the - and take only the first part, e.g.
split('Katniss Mellark - Everdeen', '-')[0]
and combine it with the trim(...) to remove the potential empty spaces
trim(split('Katniss Mellark - Everdeen', '-')[0])
Hello @Anonymous ,
if the second name is always after a - you can use the split(...) expression, split the string by the - and take only the first part, e.g.
split('Katniss Mellark - Everdeen', '-')[0]
and combine it with the trim(...) to remove the potential empty spaces
trim(split('Katniss Mellark - Everdeen', '-')[0])
User | Count |
---|---|
89 | |
41 | |
22 | |
20 | |
16 |
User | Count |
---|---|
130 | |
51 | |
48 | |
36 | |
26 |