Skip to content

Instantly share code, notes, and snippets.

@samdods
Created October 2, 2018 20:07
Show Gist options
  • Save samdods/86f172c567ae1f07fc2725455ecf62f9 to your computer and use it in GitHub Desktop.
Save samdods/86f172c567ae1f07fc2725455ecf62f9 to your computer and use it in GitHub Desktop.
struct Address {
let street: String
let city: String
let id: String?
}
struct Person {
let name: String
let address: Address
}
let people = [
Person(name: "Tom",address: Address(street: "Regent Street", city: "London", id: nil)),
Person(name: "Dick", address: Address(street: "", city: "Nottingham", id: nil)),
Person(name: "Harry", address: Address(street: "", city: "London", id: "1b0d")),
Person(name: "Alice", address: Address(street: "London Road", city: "Edinburgh", id: nil)),
Person(name: "Bob", address: Address(street: "The Avenue", city: "Nottingham", id: "0xg2")),
Person(name: "Charles", address: Address(street: "", city: "Leicester", id: nil)),
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment