Tip: Use String to Array to quickly populate arrays


String to Array is handy for testing when you need some sample data. Why bother adding ports to a Build Array node and typing in values, when you can just paste in a string. Depending on where you get the raw array data, sometimes all you need to do is a little search/replace magic in your favorite text editor, and then you’ve got a string you can paste into String to Array.

Here’s a couple of examples:

Note that the type of the array elements is defined by where you plug in String to Array. So if you want to put the array into an attribute, you’ve got to define the type of the attribute first.

A new attribute has no type:

Use a constant node to set the attribute type:

Now plug in String to Array:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s