question

ksugai avatar image
0 Likes"
ksugai asked ksugai commented

How to convert datatype from array/bundle to string

I am trying to display the label value as a string.

image.jpg

Please tell me how to convert an array which has pointers and arrays as elements to string .

FlexSim 23.0.13
stringdatatype
image.jpg (92.6 KiB)
· 6
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered ksugai commented

You can try using the JSON methods:

  1. Array test=[1,2,3];
  2. return JSON.stringify(test);

and

  1. string s="[1,2,3]";
  2. return JSON.parse(s);


· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.