2

I am trying to append the elements in an array to an existing (empty) array

if(attributes.list != "")           attributes.array.append(attributes.list.ListToArray());

What I get is something like

enter image description here

Is there a way to do this without having too loop through each item?

1
  • 1
    If the target array is empty, a simple ListToArray will suffice. Commented Nov 26, 2015 at 10:36

1 Answer 1

8

Use the optional merge parameter:

If set to true, and value parameter is an array, appends array elements individually to the source array. If false (default) the complete array is added as one element at the end, in the source array. If value is not an array this argument is ignored.

Setting merge=true will append the elements individually, rather appending the whole array as a single element:

attributes.array.append(attributes.list.ListToArray(), true);

ArrayAppend(array, merge) Example

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.