({{, (RefLink[KeyComplement, paclet:ref/KeyComplement])[{(Subscript[assoc, all]),(Subscript[assoc, 1]),(Subscript[assoc, 2]),…}] 
generates an association in which only elements whose keys appear in (Subscript[assoc, all]) but not in any of the (Subscript[assoc, i]) are retained.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[KeyComplement, paclet:ref/KeyComplement]) preserves the order of the elements in (Subscript[assoc, all]).

(RefLink[KeyComplement, paclet:ref/KeyComplement]) can be used not only on (RefLink[Association, paclet:ref/Association]) objects, but also on lists of rules.

(RefLink[KeyComplement, paclet:ref/KeyComplement])[(Subscript[assoc, all]),(Subscript[assoc, 1]),…,(RefLink[SameTest, paclet:ref/SameTest])->test] applies test to each pair of keys of the elements in (Subscript[assoc, all]) and the (Subscript[assoc, i]) to determine whether they should be considered the same.

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Find a key that is not present elsewhere:

KeyComplement[{<|a->1,b->2|>,<|a->3,c->4|>}]

KeyComplement[{{a->1,b->2},{a->3,d->4}}]

KeyComplement[{{a->1,b->2},<|a->3,c->4|>}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Complement, paclet:ref/Complement])  ▪  (RefLink[KeyIntersection, paclet:ref/KeyIntersection])  ▪  (RefLink[KeyUnion, paclet:ref/KeyUnion])  ▪  (RefLink[JoinAcross, paclet:ref/JoinAcross])  ▪  (RefLink[KeyTake, paclet:ref/KeyTake])  ▪  (RefLink[Keys, paclet:ref/Keys])  ▪  (RefLink[Intersection, paclet:ref/Intersection])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Associations, paclet:guide/Associations])}})}})