title: Cannot convert value of type '[Surah]' to expected argument type 'Range<Int>'
body: <blockquote>
  <p>hi Guys
  i try to learn swift, i need your help
  i try to connect json with swift i get errors</p>
  </blockquote>
  <p>Cannot convert value of type '[Surah]' to expected argument type 'Range'</p>
  <p>thank you vor the help</p>
  <pre><code>struct Surah: Codable {
  struct Juz: Codable {
      let index: String
      let verse: Verse
  }
  struct Verse: Codable {
      let start, end: String
  }
  enum Place: String, Codable {
      case mecca = &quot;Mecca&quot;
      case medina = &quot;Medina&quot;
  }
  enum TypeEnum: String, Codable {
      case madaniyah = &quot;Madaniyah&quot;
      case makkiyah = &quot;Makkiyah&quot;
  }
  
  
  
  let place: Place
  let type: TypeEnum
  let count: Int
  let title, titleAr, index, pages: String
  let juz: [Juz] }
  
  
  /***************/
  
  struct ContentView: View {
  
      let surahs: [Surah] = Bundle.main.decode(&quot;source/surah.json&quot;)
      var body: some View {
          NavigationView{
              List{
                  ForEach(surahs){section in
                      Section(header:Text(section.title)){
                          ForEach(section.juz, id: \.verse){juzs in
                              Text(juzs.verse.start)
                          }
                      }
                  }
              }
          }
      }
  }
  </code></pre>
  <p>JSON:</p>
  <pre><code>   [{
      &quot;place&quot;: &quot;Mecca&quot;,
      &quot;type&quot;: &quot;Makkiyah&quot;,
      &quot;count&quot;: 7,
      &quot;title&quot;: &quot;Al-Fatiha&quot;,
      &quot;titleAr&quot;:&quot;الفاتحة&quot;,
      &quot;index&quot;: &quot;001&quot;,
      &quot;pages&quot;: &quot;1&quot;,
      &quot;juz&quot;: [
          {
              &quot;index&quot;: &quot;01&quot;,
              &quot;verse&quot;: {
                  &quot;start&quot;: &quot;verse_1&quot;,
                  &quot;end&quot;: &quot;verse_7&quot;
              }
          }
      ]
  },
  {
      &quot;place&quot;: &quot;Medina&quot;,
      &quot;type&quot;: &quot;Madaniyah&quot;,
      &quot;count&quot;: 286,
      &quot;title&quot;: &quot;Al-Baqara&quot;,
      &quot;titleAr&quot;:&quot;البقرة&quot;,
      &quot;index&quot;: &quot;002&quot;,
      &quot;pages&quot;: &quot;2&quot;,
      &quot;juz&quot;: [
          {
              &quot;index&quot;: &quot;01&quot;,
              &quot;verse&quot;: {
                  &quot;start&quot;: &quot;verse_1&quot;,
                  &quot;end&quot;: &quot;verse_141&quot;
              }
          },
          {
              &quot;index&quot;: &quot;02&quot;,
              &quot;verse&quot;: {
                  &quot;start&quot;: &quot;verse_142&quot;,
                  &quot;end&quot;: &quot;verse_252&quot;
              }
          },
          {
              &quot;index&quot;: &quot;03&quot;,
              &quot;verse&quot;: {
                  &quot;start&quot;: &quot;verse_253&quot;,
                  &quot;end&quot;: &quot;verse_286&quot;
              }
          }
      ]
  }]
  </code></pre>
  <p>I'm trying to create forEach method for horizontal collection for properties</p>
  <p>how can i call this part of json??</p>
  <p>I hope someone can help me..</p>
  <p>now i need to call second Json part in my Swift</p>
  <pre><code>{
  &quot;index&quot;: &quot;001&quot;,
  &quot;name&quot;: &quot;al-Fatihah&quot;,
  &quot;verse&quot;: {
      &quot;verse_1&quot;: &quot;بِسْمِ ٱللَّهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ&quot;,
      &quot;verse_2&quot;: &quot;ٱلْحَمْدُ لِلَّهِ رَبِّ ٱلْعَٰلَمِينَ&quot;,
      &quot;verse_3&quot;: &quot;ٱلرَّحْمَٰنِ ٱلرَّحِيمِ&quot;,
      &quot;verse_4&quot;: &quot;مَٰلِكِ يَوْمِ ٱلدِّينِ&quot;,
      &quot;verse_5&quot;: &quot;إِيَّاكَ نَعْبُدُ وَإِيَّاكَ نَسْتَعِينُ&quot;,
      &quot;verse_6&quot;: &quot;ٱهْدِنَا ٱلصِّرَٰطَ ٱلْمُسْتَقِيمَ&quot;,
      &quot;verse_7&quot;: &quot;صِرَٰطَ ٱلَّذِينَ أَنْعَمْتَ عَلَيْهِمْ غَيْرِ ٱلْمَغْضُوبِ عَلَيْهِمْ وَلَا ٱلضَّآلِّينَ&quot;
  },
  &quot;count&quot;: 7,
  
  &quot;juz&quot;: [
      {
          &quot;index&quot;: &quot;01&quot;,
          &quot;verse&quot;: {
              &quot;start&quot;: &quot;verse_1&quot;,
              &quot;end&quot;: &quot;verse_7&quot;
          }
      }
  ]
  }
  </code></pre>
  <p>how can I call it up and code it? or formatting</p>