Object Transformers

Object transformers can be used on a value data type of Array, including dictionaries coming from other transformers, such as by using dot notation on another dictionary. Following transformers are available:

keys

Returns Array with all keys of the source dictionary.

  • Usage: .keys()

  • Example usage: dictionary.keys()

  • Example return: ["bob": "ferrari", "dan": "lada"] to ["bob", "dan"]

values

Returns Array with all values of the source dictionary.

  • Usage: .values()

  • Example usage: dictionary.values()

  • Example return: ["bob": "ferrari", "dan": "lada"] to ["ferrari", "lada"]

add

Returns copy of the source dictionary extended by provided key: value. Value can be either plain value or evaluated piece of context.

  • Usage: .add(key, value)

  • Example usage: value.add("Also Bob", self.bob)

  • Example return: ["bob": "ferrari", "dan": "lada"] to ["bob": "ferrari", "dan": "lada", "Also Bob": "ferrari"]

count

Returns the number of key-value pairs in the collection. Note that if the dictionary is nested, it will not count the size of nested elements, only key-value pairs of the root level.

  • Usage: .count()

  • Example usage: dictionary.count()

  • Example return: ["bob": "ferrari", "dan": "lada"] to 2

Last updated