How to convert a Dict to a Struct

This works:

set_dict=Dict{String, Any}("log_level" => 1.0, "area" => 20.0, "solver" => "IDA")

mutable struct Settings
    log_level::Int64
    area::Float64
    solver::String
end

function set_struct(set_dict)
    set = Settings(0, 0, "")
    for (key, value) in set_dict
        # set field  of the struct with the name key to the corresponding value
        setproperty!(set, Symbol(key), value)
    end
    set
end

set_struct(set_dict)