Connectors / Helper / List Helper

Manipulate an array of data (updated: 1657714911759)

List Helper

Perform quick manipulations to an array of data.

Overview

When you are dealing with one or more lists of data, the List Helpers connector provides a range of operations to help you manage and manipulate your listed data as required.

You can combine data from multiple sources, sort it, extract certain values, find common items, create batches for processing...the "list" goes on!

See our operation summaries below for more ideas and information on your potential list and data manipulation options.

The List Helpers operations are primarily for dealing with pre-existing lists of data coming from other services (via workflow triggers or connectors)

If you wish to create a list from scratch the most common operation to use is the Append to List operation found in the Data Storage connector.

List Helper Templates

Below are some relevant templates you may wish to use or learn from. The full range can be found in our Templates Library.

Templates demonstrate pre-configured best practices / common use cases as well as examples of how to use this connector and how best to integrate it with others.

IMPORTANT! Please make sure you read the notes and instructional sections on this page before using any of these templates. A basic understanding of this connector's capabilities will help avoid potential pitfalls during your own build process.

Important notes

Your returned items

Note that the List Helper will always return its results in the form of an array INSIDE of an object.

You will need to form a level of extraction to the results in order play with the array results themselves.

Data types

Note you can select a number of type formats whenever you are adding an item to a list.

This is not applicable to every property / operation but is very common and great for multiple use cases.

list-helper-item-type

Operations

Add item to list

Allows you to add an individual item to a pre-existing list

USER TIP: If you wish to add several items, please see Add multiple items to list below.

Add multiple items to list

Allows you to add multiple items to a pre-existing list

USER TIP: If you wish to join two 'complete' sets of lists together, please see Concatenate below.

Chunk

Creates smaller list sets from the original.

You will then need to use the Loop Connector to loop through each batch (which will often need to be sent to a sub-processing workflow to manage the scale and complexity of your data processing)

Concatenate

Joins two lists together

Contains

Checks your list for specified item

Returns:

  • True if found

  • False if not

Count items

Counts how many items are in your list

Delete items from list

Allows you to remove items you specify from a list

Difference

Allows you to compare two lists

Returns only the items that do not exist within the second

USER TIP: If you want to create a list of the duplicates found within both lists, use Intersection instead.

Filter

Allows you to filter your list for items for specific values

Find object in list

First

Returns the first item found within your list

USER TIP: If you wish to return the opposite, please check out the Last operation below.

Get item by index

Allows you to numerically select the item you want to return

Get list of page numbers

Divides your list into separate pages

Get unique items by key

Builds a new list of items based on the Key reference

Intersection

For two given lists this operation returns only the items that exist in BOTH lists.

USER TIP: If you want to create a list consisting of the unique items found, use Difference instead.

Iterative transform

Goes through the fields available and alters them as requested (capitalize, camelCase etc.)

Join

Joins all the list items into a singular string

Last

Returns the last item within a list

USER TIP: If you wish to return the opposite, please check out the First operation above.

Pluck

A list of values if created from the item property referenced

Remove duplicates

Ensures no duplicate items exist

IMPORTANT!: This operation can only remove simple items from an array. It can't remove objects based on a particular field in that object being unique. If this is your requirement then please see the Useful scripts: Removing duplicate objects page for a potential answer.

Rename keys

Updates the name of a particular field

Reverse

Reverses the order of a list

Rotate first item

Puts the first item in a list at the bottom

Simple sort

Sorts a list in ascending or descending order

Slice

Creates a new list based on a section of your current list

Sort objects

Allows you to put your items in ascending or descending order

Zip

Takes two lists and combines them into one item with corresponding properties

All Operations

Latest version:

2.1

Add item to list

Adds an item to the end of a list. If this list doesn't already exist, then a new list will be returned with just the new item.

Add multiple items to list

Adds multiple items to the end of a list. If this list doesn't already exist, then a new list will be returned with just the new items.

Chunk

Split a list of items into lists of a fixed size. If the list can’t be split evenly, the final chunk will be the remaining elements.

Concatenate

Concatenate two lists together, adding all of the items from the second list after the items in the first list.

Contains

Returns true if the match item in contained in the list, false otherwise.

Count items

Counts up the number of items (or length) in the list.

Delete items from list

Delete all items from a list that match a condition.

Difference

For a given list, filter it down to only return the items that do NOT exist in the second list.

Filter

Use filter conditions to filter a list of objects.

Find object in list

From a list of objects, pick the first object that matches the fields in the match object.

First

Given a list of items, get the first one.

Get item by index

Given a list of items, retrieve the one at a specified index.

Get list of page numbers

Get a list of "page numbers", given a total count, along with the number of items you would like to have in each page. For example, if you had 300 records and 100 per page, the list "[1,2,3]" would be returned.

Get numbers between

Given a minimum and maximum value, get a list of all of the numbers in between the two. Includes both the minimum and maximum numbers too.

Get unique items by key

Given a list of objects, retrieve a unique list of objects, excluding duplicate values for a specific key.

Intersection

For two given lists, return only the items that exist in both lists.

Iterative transform

Given a list, iterates through the enumerable components, and transforms the associated values accordingly.

Join

Join all items in a list together as a string, separated by a separator.

Last

Given a list of items, get the last one.

Pluck

Given a list of objects, extracts the value of a specific key from each one, returning a flat list of the values for all objects.

Remove duplicates

Ensures that every item in a list exists once, and only once. Removes any duplicate values.

Rename keys

Renames all keys in a list of objects.

Reverse

Reverse the order of a list.

Rotate first item

Takes the first item of the list and puts it at the back.

Simple sort

Sorts a list of strings and / or numbers in ascending or descending order.

Slice

Creates a slice of the list from start up to, but not including, end.

Sort objects

Given the inputs list, key and order ("ascending", "descending"), sort the object by the specified key in the desired order.

Zip

Takes a list of keys and a second list of values and returns a single object with corresponding key value pairs.