Applies to

Bridge by Smartsheet

Bridge utilities: Array Management

Array management for tailored data manipulation.

Who can use this?

Plans:

  • Bridge by Smartsheet

When accessing an external API, the data often needs to be filtered or structured in the way you want to use it. You may need to add, remove, sort, or manipulate the data. With Array Management functions, you can customize the data to suit your needs without writing your code or modifying the backend service.

Add Object To Array

Enables you to add record to an array. The Add Object To Array utility requires you to fill in the following fields:

  • Array: reference to the existing array
  • Object: the object you want to add to the array:
    • Key #1: the label of the object to be added
    • Value #1: the value of the object to be added

This utility can't simply be used to add entries to a list in an array.

Delete From Array

Enables you to delete a specific record from an array. The Delete From Array utility requires you to fill in the following fields:

  • Array: Reference to the existing array
  • Entry: Which object or entry should be removed, with the first entry being 1.

For the other array utilities, the first entry is 0.

Extract Field From Array

Extract a specific field from the Array, either as an Array or a CSV as the output. The Extract Field From Array utility requires you to fill in the following fields:

  • Array: Reference to the existing array
  • Key: The name of the field to be extracted
  • Output: Format of the output result

The image below shows the array extracted from the left, and the result of removing the field type is returned as an array.

Brandfolder Image
Array Management utilities examples

Offset Array

Allows you to retrieve a set of data from the array, deliberately offset by a certain amount. This is very useful if the API you accessed data from doesn't support data pagination. The Offset Array utility requires you to fill in the following fields:

  • Array: Reference to the existing array
  • Trim Size: The size of the resulting array
  • Offset: Which entry in the referenced array to start from

For instance, if the original array has ten entries, Trim Size is set to 4 and Offset to 3, the resulting array will consist of entries 3-6 from the original array.

Pick From Array

Allows you to retrieve a random entry from the array to use elsewhere. The Pick from Array utility requires you to fill in the following field:

  • Array: Reference to the array to pick an entry from

Size/Length

Returns the size (number of entries) of an array. The Pick from Array utility requires you to fill in the following field:

  • Data: Reference to the array to get the length of

Sort Object Array

Enables you to sort the array by the value of any field in the object structure of an array. The Sort Object Array utility requires you to fill in the following fields:

  • Array: Reference to the array to sort
  • Sort Field: Object to sort by
  • Sort Order: Option to sort results in an ascending or descending order

The image below shows the array to be sorted to the left and the returned array with ascending sort order selected to the right.

Brandfolder Image
Array Management utilities examples

Trim Array

Enables you to reduce the array to a specific number of items. The Trim Array utility requires you to fill in the following fields:

  • Array: Reference to the array to be trimmed
  • Trim Size: Size/Length (number of entries) of the resulting array
Was this article helpful?
YesNo