title: How can I find the highest Int in a Struct in Swift
body: <p>Assuming I have a struct such as:</p>
  
  <pre><code>struct TestStruct {
      var name: String
      var rank: Int
  }
  
  var foo1 = [TestStruct]()
  </code></pre>
  
  <p>What is the most efficient way to find the highest <code>rank</code> value inside <code>foo1</code> ? Is it somehow possible to use <code>maxElement()</code>on a Struct ?</p>