string array in toText

Q and A about functionality and how to solve a special task for your application.

Moderator: Support

Post Reply
chriss0212
Posts: 666
Joined: 18 Jan 2012, 20:56
Location: wuppertal
Contact:

string array in toText

Post by chriss0212 » 18 Jan 2016, 16:25

strange thing,

i want to create a json string... for that i am using a toString node. one input should be a string array.... but how can i feed it in? if i use a string node behind the array... i will get a comma seperatted string... so far so good... but: if i have a string array with two values:

1st: hello
2nd hello world

you will get it like this:
hello, "hello world"

so second value gets "" why just the second string and not the first string?

greetz

christian

User avatar
Karol
Posts: 605
Joined: 10 Jan 2012, 12:07

Re: string array in toText

Post by Karol » 20 Jan 2016, 11:06

The "" come from the space!
And they are needed if you have a text like "one, two, three". These are not three strings but one! The commas belong to the string!

Cheers
Karol

chriss0212
Posts: 666
Joined: 18 Jan 2012, 20:56
Location: wuppertal
Contact:

Re: string array in toText

Post by chriss0212 » 21 Jan 2016, 11:57

hi karol,

ok...got it.... but why dont you use always double qutes? this would make parsing easier and i could feed it directly into a json string array ;)

greetz

christian

Post Reply