Create a Dictionary of Maps
maps = Dict(:Arad => Dict(:Zerinda => 75,:Sibiu => 140,:Timisora => 118))
Access Arad key works with the below code
maps[:Arad]
Access nested key works with the below code
maps[:Arad][:Sibiu]
Access key with getindex method work with the below code
getindex(maps,:Arad)
Access nested key with getindex works with the below code
getindex(getindex(maps,:Arad),:Sibiu)
Assign a variable
startpos = “Arad”
Here is my issue. How can i get key and nested key value using the variable ? few example I have issues.
getindex(maps,startpos)
maps.[startpos]