Hi,
I am trying to make an app that check people in. So far so good, but I got stuck on the following problem: I want to have an array with the name of the person and a date that this person will check in., in 1 array.
So when I select a date it will show a list all that people that will check that day.
Here the example of the array:
import Foundation
import SwiftUI
class Data: ObservableObject {
var id = UUID()
@Published var person = [“Micheal Jordan”,
“Scottie Pippen”,
“Dennis Rodman”,
“Steve Kerr”
]
@Published var personChecked = String
@Published var date: [String] = [ “6 April 2023”,
“7 April 2023”,
“20 April 2023”,
“28 April 2023”
]
}
How can I combine them together. I know I can use a JSON file and it will be much easier but this app won’t be using internet. When the person is checked in, it will be moved to personChecked.