Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Julia dictionaries

Is there a function to get a list of all the dictionaries I am using in a Julia session?

I am trying to find the value of a key inside a dictionary, but cant seem to find the dictionary and wanted to make sure I have it.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

I assume that you want to get a list of all dictionaries defined in your Julia session.

Supposing you have
a=Dict() and b=Dict() you can find them with the following code:

julia> [f for f in names(Main) if getfield(Main,f) isa AbstractDict]
2-element Vector{Symbol}:
 :a
 :b
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading