How does Array function work in Column Expressions node?

#1

I have expressions as below, it shows error also.

wild_arr = arrayCreate(“Brand”, “eigenvalue”)
arrayAdd(wild_arr ) = [“WILD”,“wd”]
arrayAdd(wild_arr ) = [“WILD”,“west”]
arrayAdd(wild_arr ) = [“WILD”,“wesn”]
//arrayToString(wild_arr )

Appreciate if anyone shares an example to demo how Array function works.

0 Likes

#2

Hi @Hawk326040,

To add objects to the array you should use the arrayAdd or arrayAddAll function like this:

To add a single object:
wild_arr = arrayAdd(wild_arr, "wild")

To add several objects at once:
wild_arr= arrayAddAll(wild_arr, "wild", "wd", "west", "wesn")

:blush:

P.S. What you see in the description is an example of the function on the left and the output on the right.

1 Like

#3

Hi Armingrudd,
Thanks for your guidance, yes, it works now.

I saw the example in the dialog of Column Expressions Node when clicking “+ function” and selecting
arrayAdd(array, obj) in the help area on the right side.

1 Like