How to convert a Dict to a Struct

How can I convert a dict to a struct?

I have the following code:

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
        print(key, ": "); println(value)
        # set field  of the struct with the name key to the corresponding value
    end
    set
end

set_struct(set_dict)

But how can I access the fields of a struct using a string variable?

The dictionary will usually have less entries than the struct has fields.