'Traversing Nested Dicts in Julia

I'm using the excellent Julia Mat File reader to read a mat file with the structure similar to test2

Dict1 = Dict("a" => [1,3], "b" => 2, "c" => "Hello")
test2=Dict("test"=>Dict1,"a"=>[2,4])

With the read command I can access Dict1 like this:

using MAT
read(file, "test")

But I'd also like to access variables within Dict1, like "a" or "b".

Any suggestions?

Thanks!



Solution 1:[1]

dict_1 = Dict("a" => [1,3], "b" => 2, "c" => "Hello")

dict_2 = Dict("test" => dict_1, "a" => [2,4])

@show dict_2["test"]["b"]

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 dvjh