Skip to main content Skip to complementary content

Replace Field Names In List block

The block Replace Field Names In List allows you to replace keys with new keys, for objects in a list (array).

The Replace Field Names In List block.

The Replace Field Names In List block.

Example inputs:

Inputs for the Replace Field Names In List block.

The Inputs tab of the Replace Field Names In List block. There is a Field Names To Replace dropdown for each field name in the attached list. In the top dropdown, Field name to replace is set to mail, and New field name is set to email.

Example list

[
      {"mail": "john@doe.com", "fname": "John", "lname": "Doe"},
      {"mail": "bill@acme.com", "fname": "Bill", "lname": "Davis" }
]

With the above example inputs, the output list will be:

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

Iterator

This block does not use an iterator, which means that the input list will be loaded in memory before doing the replace of field names. This means that an automation using this block will fail with an out of memory error for very large lists.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!