hugo/docs/content/en/functions/collections/SymDiff.md
2023-12-04 15:24:01 +01:00

525 B

title description categories keywords action related aliases
collections.SymDiff Returns the symmetric difference of two collections.
aliases returnType signatures
symdiff
any
COLLECTION | collections.SymDiff COLLECTION
collections.Complement
collections.Intersect
collections.SymDiff
collections.Union
/functions/symdiff

Example:

{{ slice 1 2 3 | symdiff (slice 3 4) }} → [1 2 4]

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