Modify Array

Description

 

Lets you modify an array by perpending, inserting, appending, swapping or deleting the values in the array.

 

Properties

Triggers Immediately

Array Type

Behaviour: Perform the function on an Array Behaviour

Value: Perform the function on a JSON formatted value. when entering a dictionary JSON value, the array will be the list of keys in the Dictionary.

Modification

Prepend Value: Insert a value at the first index (index 0) of the array.

Insert Value: Insert a value at the specified index of the array. Note that the first value would have to be index 0. Eg. If you have an array with values [cat, dog] inserting 'pickles' at index 1 would result in [cat, pickles, dog]. Note 2, if you try to insert a value that is not in the bounds of the array, the array will not be modified. Eg. inserting 'pickles' at index 10, when the array only has 2 items.

Append Value: Insert a value at the end of the array.

Replace Value: Replaces a value with another value at the specified index.

Set Array: Removes all values from the array and inserts the values from another specified array.

Swap Value: Swaps the indexes of specified items in the array. Eg. If you have [cat, dog, pickles]. swapping indexes 1 and 2 will result in [cat, pickles, dog]. Note, when trying to swap values that are not in the bounds of the array, the array will not be modified.

Delete First Value: Removes a value from a specified index in the array. Note, trying to remove a value from an index not in the bounds of the array will not modify the array.

Delete Last Value: Removes the last value in the Array.

Delete All Values: Clears out the entire array.

Outputs

Array

Outputs the values in the modified array.

 

 

Examples 

If you have an array that represents a deck of cards, removing the first value in the array will be like removing the top card from the deck.

 

Related

Array

Box Container

Dictionary

Get Array Value

Get Dictionary Value

Modify Dictionary

Value

 

ModifyArrayReference.gif

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.