I haven’t used Trie much myself, but it looks like the API could use some more ways of enumerating the keys, values, and key-value pairs of a trie directly. I’ll file an issue.
Thanks again, but on the syntax I have to get used to it first.
May a ask one further question. This function returns a leaf to the frontend javascript canister. Is there a library to convert that data structure to a better useable javascript array or object ?
Currently the javascript agent gives you types closely mapped to the candid IDL types, there has been discussion on the merits of this of course, a good approach is to create small utility functions in your project that handle conversions for you, this also allows you to maintain any future changes to the returned types in a central place, something similar to this: https://github.com/enzoh/superheroes/blob/master/src/www/utilities/idl.js