title: 'subscript(_:)' is unavailable: cannot subscript String with an Int, use a String.Index instead
body: <p>I'm trying to pass the data and got this error: <code>'subscript(_:)' is unavailable: cannot subscript String with an Int, use a String.Index instead.</code> Here is my code:</p>
  <pre><code>func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
          let cell: CustomLoopsCell = beatTableView.dequeueReusableCell(withIdentifier: &quot;firstLoopCell&quot;, for: indexPath) as! CustomLoopsCell
          
          let beatLoop = overtunePacks[indexPath.row]
  
          // On the lines which is down I'm getting this error
          let beatDesc = loopsDesc[indexPath.row]
          let beatProd = loopsProd[indexPath.row]
          let beatAudio = loopsAudio[indexPath.row] 
          let beatInst = loopsInst[indexPath.row]
          
          cell.loopNameLabel.text = beatDesc
          cell.producerLabel.text = beatProd
          cell.instrumentLabel.text = beatInst
  </code></pre>
  <p>Here is the code from another view controller, from where I'm passing the data:</p>
  <pre><code>func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
      let vc = storyboard?.instantiateViewController(identifier: &quot;BeatViewID&quot;) as? BeatPackViewController
      vc?.beatInfoCollectName = beatInfoCollect[indexPath.row].name
      vc?.beatProducerName = beatInfoCollect[indexPath.row].producer
      vc?.imageBeat = beatInfoCollect[indexPath.row].imagename
      vc?.loopsAudio = beatAudioCollect[indexPath.row].loopPath
      vc?.loopsDesc = beatAudioCollect[indexPath.row].name
      vc?.loopsInst = beatAudioCollect[indexPath.row].instrument
      vc?.loopsProd = beatAudioCollect[indexPath.row].producer
      self.navigationController?.pushViewController(vc!, animated: true)
  }
  </code></pre>
  <p>Here is my variables in second view controller, where I'm passing data:</p>
  <pre><code>var loopsAudio = &quot;&quot;
      var loopsDesc = &quot;&quot;
      var loopsInst = &quot;&quot;
      var loopsProd = &quot;&quot;
  </code></pre>
  <p>Here is what I want to display:</p>
  <pre><code>struct BeatLoops: Decodable {
          let name: String
          let instrument: String
          let loopPath: String
          let producer: String
          
          var songURL : URL {
              let components = loopPath.components(separatedBy: &quot;.&quot;)
              guard components.count == 2,
                    let url = Bundle.main.url(forResource: components[0], withExtension: components[1]) else { fatalError(&quot;Audio file is missing&quot;) }
              return url
          }
      }
  </code></pre>
  <p>I'm parsing this data and have instance: <code>var beatAudioCollect = [BeatLoops]()</code></p>