Sort Associative Array by Key

Alexander Zhirov azhirov1991 at gmail.com
Thu Feb 9 07:19:08 UTC 2023


> foo.byPair
>  .array
>  .sort!((a, b) => a.key < b.key)
>  .map!(a => a.value);

Is it possible to specify in `map` to return the result `[a.key] 
= a.value`? To make the result look like `[key:[val], key:[val]]`


More information about the Digitalmars-d-learn mailing list