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 |
Behavior: Perform the function on an Array Behavior. 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. Intersect Array: Takes another array and outputs an array only containing values from both arrays. Remove Duplicates: Removes duplicate items from the array. |
| Pointer |
(Prepend, Insert, Append, Replace Value) If this toggle is on, the new value will reference the behavior's output field instead of a hardcoded value. This means that when the output of a behavior has been updated, its changes will be reflected in the 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.

