[Solved] How to build Swift Multi Array


Create a struct/class with the relevant properties and then create an array of that struct/class type, i.e.

struct Person {
    let id: Int
    let name: String
    let age: Int
}

Now, create an array of Person type

let arr = [Person(id: 1, name: "Jim Willson", age: 35), Person(id: 2, name: "Bill Karry", age: 48), Person(id: 3, name: "Bobby Brown", age: 32)]

0

solved How to build Swift Multi Array