CUE does not have a
The proposed method is to use
An associative list is a list that defines a key for each of its values, effectively turning it into a map. In CUE terms, elements with the same key are unified and collapsed onto a single element as if it were a struct.
In the following, we have
original.cuecontains two lists we’d like to unify
results.cuecontains the desired results
syntax.cuecontains the CUE to make this happen
The syntax uses the
@.field to define the key
used to determine which values should be unified
to produce the result.
You can find more details on GitHub:
Today, you can use structs to achieve unique elements to or from a list. See the unique list pattern for more details