Applies to

Bridge by Smartsheet

Customize Data with Array Management

PLANS

  • Bridge by Smartsheet

Managing Arrays

Often, when accessing an external API, the data isn't filtered or structured in the way you want to use it. You may need to add, remove, sort or manipulate the data in other ways. With Array Management functions, you can customise the data to suit your needs, without having to write your own code, or modify the backend service.

Add Object To Array

Enables you to add an additional record to an array.

Add Objects to Array

Add Object To Array Fields

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

This module can't be used to simply add entries to a list in an array. Below the left image shows an array with objects and the right image shows an array with a list.

Array with List

Delete From Array

Enables you to delete a specific record from an array.

Delete from Array

Delete From Array Fields

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

Note: for the other array modules 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.

Extract Field from Array 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 being extracted from to the left and the result of extracting the field 'Type', returned as an array.

Extracted array

Offset Array

Lets you retrieve a set of data from the array, deliberately offset by a certain amount. This is very useful if the API you have been accessing data from does not support pagination of data.

Offset Array

Offset Array 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 10 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

Pick from Array

 

Allows you to retrieve a random entry from the array to use elsewhere.

Pick from Array Fields

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

Shuffle Order Of Array

Lets you randomize the order of the array if you then want to output that data elsewhere in a random order.

Shuffle Order of Array

Shuffle Order Of Array Fields

  • Array: Reference to the array to shuffle

Size/Length

Returns the size (number of entries) of an array.

Size/Length

 

Size/Length Fields

  • 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.

Sort Object Array

Sort Object Array 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 sort order Ascending selected to the right.

Sort order ascending

Trim Array

Enables you to reduce the array to a specific number of items.

Trim Array

Trim Array 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