title: Swift - Append object: array index out of range
body: <p>When I try to add an item to my array it gives me and EXC BAD INSTRUCTION error and it says</p>
  
  <pre><code>fatal error: Array index out of range
  </code></pre>
  
  <p>That is the code:</p>
  
  <pre><code>var tabelle : [[Actions]] = [[]]
  
  func doSomething() {
  
      var results = self.fetch()
  
      var oldProjektName: String = results[0].projektName
      var count: Int = 0
  
      for item in results {
          if oldProjektName == item.projektName {
             tabelle[count].append(item)               
          } else {
              count++
              tabelle[count].append(item)
          }
          oldProjektName = item.projektName
      }
  }
  </code></pre>
  
  <p>As long as count = 0 it does not give me an error but when count = 1 then the app crashes.</p>