title: Retrieving data from firebase Realtime Datbase with SwiftUI Xcode 11
body: <p>For a few days I have been trying to read my data from firebase without success.
  Indeed it is a set of tables also containing tables.</p>
  <p>This function is to retrieve the subjects and at the same time the paragraphs</p>
  <pre><code>func getSubjects() {
      let subjectRef = database.child(&quot;subjects&quot;)
      subjectRef.observe(.childAdded, with: { (snapshot) in
          for child in snapshot.children {
              print(snapshot)
               if let snapshot = child as? DataSnapshot,
                  let subject = Subject(snapshot.value)
              //subjectList.append(subject)
             // print(&quot;Data : \(subject)&quot;)
                  
          }
      })
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/CLCXV.png" rel="nofollow noreferrer">This is the firebase screen</a></p>
  <p><a href="https://i.stack.imgur.com/oWo7G.png" rel="nofollow noreferrer">Console screen</a></p>
  <p>On Android I didn't have this problem, but since I'm new to iOS, I'm having a hard time coping.
  Any help will be welcome. Thank you</p>