Computed Field Methods
Split
Returns one of the components of a field’s string output after splitting it with a delimiter. Common use cases for this method include discarding unwanted data from a field’s output, and splitting output from one field into separate fields.
Parameters
The following parameters are in the computed field’s global Method parameter:
key | value | description |
---|---|---|
id (required) | split | |
source_id (required) | a field id in the current config | The id of the field to split into substrings. |
separator (required) | string | The separator to use in the split. |
index | integer | The zero-based index of the substring to return after the split. If unspecified, returns all the split substrings as an array. |
Examples
The following example shows splitting a field’s output to extract a first and last name.
Config
JSON
Example document
The following image shows the example document used with this example config:
Example document | Download link |
---|
Output
JSON