Accessing and changing struct fields using a dictionary

for (k,v) in attr
       setfield!(agent,k,v)
end
1 Like