title: Loop through Swift struct to get keys and values
body: <p>I'd like to loop trough every key of <code>mystruct</code> and print its <strong>key</strong> and its <strong>value</strong> for every property.</p>
  
  <pre><code>struct mystruct {
    var a = "11215"
    var b = "21212"
    var c = "39932"
  }
  
  func loopthrough {
      for (key, value) in mystruct {
          print("key: \(key), value: \(value)") // Type mystruct.Type does not conform to protocol 'Sequence'
      }
  }
  </code></pre>
  
  <p>But using the few lines from above I always get this error message: </p>
  
  <blockquote>
    <p>Type mystruct.Type does not conform to protocol 'Sequence'</p>
  </blockquote>
  
  <p>How can I avoid getting this message?</p>