Array

Array transforms operate on JSON arrays.

array.join

Transforms a JSON array by joining the values into a string.

["b","c","d"]
b.c.d

Settings

FieldTypeDescriptionRequired
object.source_keystringRetrieves a value from an object for transformation.No
object.target_keystringPlaces a value into an object after transformation.No
separatorstringSeparator substring that is used to join values.Yes

Example

sub.transform.array.join(
  settings={separator: '.'}
)
sub.tf.arr.join({separator: '.'})

array.zip

Transforms JSON arrays by reindexing values into an array of arrays or array of objects.

{"a":[["b","c"],[1,2]]}
{"a":[["b",1],["c",2]]}

Settings

FieldTypeDescriptionRequired
object.source_keystringRetrieves a value from an object for transformation.Yes
object.target_keystringPlaces a value into an object after transformation.Yes

Example

sub.transform.array.zip(
  settings={object: {source_key: 'arr', target_key: 'arr'}}
)
sub.tf.arr.zip({obj: {src: 'arr', trg: 'arr'}})