I am looking for something better than
As Map will work over the entire association (a) and then Select will work over all of the results. Something like
But Cases only returns values (or functions of the values) not the keys. I also tried
But it keeps the keys that fail the test and maps them to Null.
My sample association is
a = <|"a" -> 1, "b" -> 2, "c" -> 3, "d" -> 4, "e" -> 5|>;
I would like to do something like
My actual case is much more complicated but if I have a way to Map and Select in one pass for this case it will solve my more difficult problem. Thanks!