跳到主要內容 跳至補充內容

Transform list

A transform list block takes a list and transforms it to another list by mapping existing values to new fields.

transform list block

A transform list block is commonly used in the following situation:

  • When an automation contains a list, and you want to add new fields to the items in that list.

Configuring a transform list block

Configure the transform list block to transform the output of one list to another list.

資訊備註

List blocks do not use iterators. This means that lists are loaded in memory before doing the processing of any data. If your automation contains large lists, the automation might fail with an out-of-memory error. Instead, use a loop block to iterate through large lists.

Inputs

The transform list block requires a list and a field. The list can be a field mapped list from a preceding block. The field is the new key that the existing value is mapped to. Enter the new field name, then field map the list value you want to transform.

Example of transforming a list

Input list:

[
      {"email": "john@doe.com", "name": "John Doe"},
      {"email": "bill@acme.com", "name": "Bill Davis"}
]

The list above is the input list. It contains two objects with two key-value pairs. The new field name is fullname and all values {$.inputs.name} are mapped to the new field name.

Transform list block input fields

Transform list block inputs

The transform list block produces the following list:

[
      {"fullname": "John Doe"},
      {"fullname": "Bill Davis"}
]

此頁面是否對您有幫助?

若您發現此頁面或其內容有任何問題——錯字、遺漏步驟或技術錯誤——請告知我們可以如何改善!