title: How to convert an array of Strings to a list
body: <p>I have an array of Strings and I want to use that as a list. </p>
  
  <p>I followed this example but I didn't get for an array. <a href="https://www.hackingwithswift.com/quick-start/swiftui/how-to-create-a-list-of-dynamic-items" rel="nofollow noreferrer">Link</a></p>
  
  <p>My current code is given below:</p>
  
  <pre><code>    struct ListOfPeripherals: Identifiable {
          var id = UUID()
          var peripheralName: String
      }
  
      struct RestaurantRow: View {
          var peripheralFromBLE: ListOfPeripherals
  
          var body: some View {
  
      // List to be implemented here
  
          }
  
      func getListOfAlphabets() -&gt; [String] {
          let listOfAlphabets = [A,B,C,D,E]
          return listOfAlphabets
      }
    }
  </code></pre>