set - PeterNaydenov/code-assembly-line GitHub Wiki

Convert current-data from string to object.

Fields

    { 
        do: 'set', 
        as: 'propertyName'
    }

Types

  • propertyName: string. Set will substitute string value with object with single propertyName that will take the value.

Example

   { do: 'set', as: 'text' }

If current-data is:

    [
          'one'
        , 'two'
        , 'three'
    ]

After set process-step current-data will look like this:

   [
        { text: 'one'}
      , { text: 'two'}
      , { text: 'three'}
   ]