Copy | COPY

Syntax

COPY( [input] )

Parameters

input
Any data may be used as the input.

Return Value

The input value is copied and then returned. The return value is identical to the original value.

Description

Any value passed into this function will be returned as an unmodified clone of the original value. This method differs from NONE([ value ]) in that object references are NOT maintained.

For example, if the process data has the following:

    {
      obj1: {
        inObj1: 'test'
      }
    }

And a subsequent transfrom has the input key of obj1 and the output key of obj2, the result of NONE() will be a copy and will NOT reference the original data. This means that both obj1 and obj2 will reference different data in memory.

For example, the following transform...

      # output key = "obj2.inObj2"
      "no ref value"
    
...will result in the following process data where inObj2 only appears obj2...
    {
      obj1: {
        inObj1: 'test',
        inObj2: 'ref value'
      },
      obj2: {
        inObj1: 'test',
        inObj2: 'no ref value'
      }
    }
    

Examples

COPY("test") # returns "test"
COPY(1) # returns 1
COPY(["test"]) # returns ["test"]
# input = {"test": 1}
COPY(${input}) # returns {"test": 1}