title: Drilling down child array swift
body: <p>I am trying to drill this object down to <code>transitions</code> from <code>[Datum]</code> but every time I use a flatMap, I simply get the same array back.</p>
  <p>Transaction expected is <code>var transactions: [String]?</code></p>
  <p>I however feel if I continue to drill down using flatMap continuously like this</p>
  <pre><code>let transactions = reportSummaryDictionary.flatMap { dictionary in
  }
  </code></pre>
  <p>I would end up with a really messy codebase. any help on how I can better drill down to transactions</p>
  <pre><code>struct Datum: Codable {
      var summary: [DatumSummary]?
  }
  
  // MARK: - DatumSummary
  struct DatumSummary: Codable {
      var summary: SummarySummary?
  }
  
  // MARK: - SummarySummary
  struct SummarySummary: Codable {
      var startingBalance: Int?
      var report: [Report]?
  }
  
  // MARK: - Report
  struct Report: Codable {
      var summary: [ReportSummaryx]?
      var transactions: [Transactionx]?
      
      // MARK: - ReportSummary
      struct ReportSummaryx: Codable {
          var amount: Int?
          var category: String?
      }
  
      // MARK: - Transaction
      struct Transactionx: Codable {
          var category: String?
          var transactions: [String]?
      }
  }
  </code></pre>