Splitting tekst with {{' Variable'.split(';')[2]}} is removing the spaces

Hello,

I am trying to split a text variable with semicolons in them.

I used both “Logica” and “Better Logic”

Say the variable contains “Hello World;Good bye World” and use `{{‘Variable’.split(‘;’)[2]}} I get “GoodbeyWorld”.

Anyone knows a solution for this?

Thanks

You can use HomeyScript. There you can use the standard JS code:
string.split( );

So it’s standard behavior? Strange.

Great. I didn’t think of HomeyScript.

Thanks.