({{, (RefLink[KeySelect, paclet:ref/KeySelect])[assoc,crit] 
selects elements in the association assoc for which crit applied to their keys is (RefLink[True, paclet:ref/True]).}, {, (RefLink[KeySelect, paclet:ref/KeySelect])[crit] 
represents an operator form of (RefLink[KeySelect, paclet:ref/KeySelect]) that can be applied to an expression.}})

OpenersNotesSection(Spacer1)Details

(RefLink[KeySelect, paclet:ref/KeySelect]) yields an (RefLink[Association, paclet:ref/Association]) object whose elements appear in the same order as they did in assoc.

(RefLink[KeySelect, paclet:ref/KeySelect]) can be applied not only to (RefLink[Association, paclet:ref/Association]) objects, but also to lists of rules.

(RefLink[KeySelect, paclet:ref/KeySelect])[crit][assoc] is equivalent to (RefLink[KeySelect, paclet:ref/KeySelect])[assoc,crit].

OpenersPrimaryExamplesSection(Spacer1)Examples  (3)

OpenersExampleSection0(Spacer1)Basic Examples  (3)

Select entries with odd keys:

KeySelect[<|1->a,2->b,3->c|>,OddQ]

Select entries from an association, using another association as a criterion:

KeySelect[<|1->a,2->b,3->c|>,<|1->False,2->True,3->True|>]

Use the operator form of (RefLink[KeySelect, paclet:ref/KeySelect]):

KeySelect[OddQ][<|1->2,2->3,3->4|>]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[KeyTake, paclet:ref/KeyTake])  ▪  (RefLink[KeyDrop, paclet:ref/KeyDrop])  ▪  (RefLink[Select, paclet:ref/Select])  ▪  (RefLink[Keys, paclet:ref/Keys])  ▪  (RefLink[KeyMap, paclet:ref/KeyMap])}})}})

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

({{(Spacer1), ({{(Spacer1)Related Links}, {(WebLink[DocumentationFooterIconsRelatedLinks-EIWL.png(Spacer1)An Elementary Introduction to the Wolfram Language, https://www.wolfram.com/language/elementary-introduction/34-associations.html])(WebLink[: Associations, https://www.wolfram.com/language/elementary-introduction/34-associations.html])}})}})