The MERGE directive merges two columns by inserting a third column into a record. The values in the third column are merged values from the two columns delimited by a specified separator.

Syntax

 merge :column1 :column2 :destination 'seperator'

Usage Notes

The columns to be merged should both be of type string.

Examples

Using this record as an example:

{
  "first": "Root",
  "last": "Joltie"
}

Applying these directives:

merge :first :last "fullname ' '
merge :first :last :fullname '''
merge :first :last :fullname '\u000A'
merge :first :last :fullname '---'

results in these records:

Separator is a single space character (' '):

{
  "first": "Root",
  "last": "Joltie",
  "fullname": "Root Joltie"
}

Separator is a single quote character ('''):

{
  "fname" : "Joltie",
  "lname" : "Root",
  "name" : "Joltie'Root"
}

Separator is the UTF-8 Line Feed character ('\u000A'):

{
  "fname" : "Joltie",
  "lname" : "Root",
  "name" : "Joltie\nRoot"
}

Separator is multiple characters ('---'):

{
  "fname" : "Joltie",
  "lname" : "Root",
  "name" : "Joltie---Root"
}