title: How to Display a Specific Type of Object in Realm Swift?
body: <p>I'm new to Realm and I'm having some trouble displaying the result as plain text. When I query from Realm(and filtering if necessary), I get the result with all key-value pairs.</p>
  <p>The function I use to read the results:</p>
  <pre><code>func getData() {
  let config = Realm.Configuration(schemaVersion: 1)
  let realm = try! Realm(configuration: config)
      
  let result = realm.objects(AllCard.self)
  print(result)
  }
  </code></pre>
  <p>}</p>
  <p>The result I get in the console:</p>
  <pre><code>Optional(Results&lt;AllCard&gt; &lt;0x7fd79dc0fed0&gt; (
  [0] AllCard {
      name = Chase Sapphire Reserve;
      bank = Chase
  },
  [1] AllCard {
      name = Citibank DoubleCash;
      bank = Citibank
  }
  </code></pre>
  <p>))</p>
  <p>So, for example, I want to display the corresponding &quot;name&quot; value as a Text(or as a list) in SwiftUI, how do I do it?
  I've tried appending the results to an empty list and displaying it as a list from there, but I couldn't get it working...
  This problem seems to be easy to solve, but at this point I'm brain-dead.
  -Thanks!</p>