crossJoin
Cartesian product of two arrays — every combination of elements from both.
array1(required): first arrayarray2(required): second array
bash
echo '{"sizes": ["S", "M", "L"], "colors": ["red", "blue"]}' \
| utlx -e 'crossJoin($input.sizes, $input.colors)'
# [["S","red"],["S","blue"],["M","red"],["M","blue"],["L","red"],["L","blue"]]utlx
{
variants: map(crossJoin($input.sizes, $input.colors), (pair) -> {
size: pair[0], color: pair[1]
})
}