I would suggest defining an accessor function and then broadcasting that function:
id(s::State) = s.ID
id.(states)
Does that work for your use case?
I would suggest defining an accessor function and then broadcasting that function:
id(s::State) = s.ID
id.(states)
Does that work for your use case?