[ANSWERED] Using Javascript to split a text string
-
Hi all,
I'm trying to figure out why my javascript is not working properly.
I have a string of text that is "participant name | 012" and I'm trying to use javascript to split the string into
1. participant name
2. index number
using the split functionHowever, I"m not getting the intended results as shown in the screenshot. I'm either sometimes getting the Name or Index only.
Any help would be greatly appreciated. Thanks!
-
You have to mutate the outputs of the JavaScript actor to Text if you are working with text, you could simply do this by connecting any text input to the output field.
-
Hi,
I put together a demo patch of Javascript text separation and joining options - its available to download from the Add-ons page. But here is one that might be useful: js-text-separator.zip
Best Wishes,
Russell
-
Ah thanks all for the pointers and examples :)
Appreciate this community in my Isadora journey!