title: Sort user list: SwiftUI - Firebase
body: <p>I am creating an application in Swift, and I am creating a section with a calendar where you will be able to see the list of users with a numeric data entered by them.
  These data are collected in a structure as follows:</p>
  <pre><code>struct User: Identifiable {
      var id: String = UUID().uuidString
      var name: String
      var surname: String
      var timetables: [String]
  
      var toCheck: [String] {
          return [name, surname]
      }
  }
  </code></pre>
  <p>User information is displayed like this:</p>
  <pre><code>ForEach(administratorManager.users) { user in
      HStack {
          VStack(alignment: .leading) {
              Text(user.name).font(.subheadline) 
              Text(user.surname).font(.subheadline)
              Text(user.orari[day]).font(.subheadline)
          }
      }
      Spacer()
  }
  </code></pre>
  <p>And they are displayed on the screen like this: <a href="https://i.stack.imgur.com/an6te.jpg" rel="nofollow noreferrer"> Photo of the list displayed on the screen</a></p>
  <p>The data is sorted according to their position in the database:
  <img src="https://i.stack.imgur.com/rGlYU.jpg" alt="Photo of the data in the database" /></p>
  <p>I'd like to sort the list by the number entered under the user's first and last name (the smallest above and so on). Anyone know how to fix?</p>