toloka.client.project.template_builder.helpers.TransformHelperV1
| Source code
TransformHelperV1( self, into: Optional[Any] = None, items: Optional[Union[BaseComponent, List[Any]]] = None, *, version: Optional[str] = '1.0.0')
Creates a new array by transforming each of the elements in the original array.
For example, you can convert an array of image links to view.image components to display these images. This may be useful if the number of images in the array is unknown in advance
Parameters | Type | Description |
---|---|---|
into | Optional[Any] | Template to transform elements in the array. The array value can be substituted using the data.local component. To do this, use the construction { "type": "data.local", "path": "item"} |
items | Optional[Union[BaseComponent, List[Any]]] | The array that you want to convert. You can specify an array in three ways:
|