I have an array value that needs to be in this order
let daysOfWeekArray = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
and currently my array looks like this
let allData = [CustomObject(day:"Tuesday", startTime: "5:00"), CustomObject(day:"Sunday", startTime: "3:00")]
array.append(allData)
How do I get the array to sort by the day?
Sorry if this seems like an easy question, new to sorting arrays.