Różnice między wybraną wersją a wersją aktualną.
| Nowa wersja | Poprzednia wersja | ||
| data-source [2025/05/23 13:29] – utworzono damian.zabawa | data-source [2025/05/23 13:32] (aktualna) – damian.zabawa | ||
|---|---|---|---|
| Linia 104: | Linia 104: | ||
| Data splitting allows creating multiple outputs from a single data source based on a specific value. | Data splitting allows creating multiple outputs from a single data source based on a specific value. | ||
| + | |||
| + | |||
| + | ```json | ||
| + | { | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ] | ||
| + | } | ||
| + | ``` | ||
| + | |||
| + | - `selector`: JSONPath expression to extract the split value | ||
| + | - `variable`: Name of the variable to use in output | ||
| + | |||
| + | |||
| + | |||
| + | ### Iterator Selectors | ||
| + | |||
| + | You can use pipe (`|`) to iterate through arrays and create splits for each element: | ||
| + | |||
| + | ```json | ||
| + | { | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | ] | ||
| + | } | ||
| + | ``` | ||
| + | |||
| + | In this example: | ||
| + | - `$.sorters` selects an array of sorters | ||
| + | - The pipe (`|`) indicates iteration through each element | ||
| + | - `$.sorter_name` extracts the sorter name from each element | ||
| + | - Each sorter name becomes a separate split | ||
| + | |||