How do you iterate over the keys or rules of an association (in any order)? E.g. for
<|"0"->"a", "1"->"b", "2"->"c"|>
I would like to either iterate over "0"
, "1"
, "2"
or tuples containing each key and value.
For example, something that performed the equivalent of a python dictionary's items
, method would be ideal (which returns a list (or iterator) in the form [(key1, value1), ...]
, so {{"0", "a"}, {"1", "b"}, {"2", "c"}}
here).
Map
,KeyValueMap
orKeyMap
? $\endgroup$KeyValueMap[List] @ asso
but who could've known :) $\endgroup$