Thanks @claude31 for the suggestion - but it feels like that could be even more complicated than just referencing the ids. In answer to your questions:
The code example shown above is massively simplified - in practice the Building struct is much more complex.
The Address objects are stored in an array which belongs to a custom class. That class is an ObservableObject and is being used as an EnvironmentObject.
Yes, the Address and Building objects both get displayed in separate Lists.
The name of a Building is edited in a SwiftUI view, and can be edited using a TextField.
Topic:
Programming Languages
SubTopic:
Swift
Tags: