hugo/docs/content/en/functions/symdiff.md
2023-05-22 16:47:07 +02:00

459 B

title description categories menu keywords signature
symdiff `collections.SymDiff` (alias `symdiff`) returns the symmetric difference of two collections.
functions
docs
parent
functions
collections
intersect
union
complement
COLLECTION | symdiff COLLECTION

Example:

{{ slice 1 2 3 | symdiff (slice 3 4) }}

The above will print [1 2 4].

Also see https://en.wikipedia.org/wiki/Symmetric_difference