title: Unable to use Financial Modeling API for swiftui project
body: <p>For the past couple of days, I have been trying to access stock news stories from the FMP API for a swift project. The data comes as a JSON in this response form:</p>
  <pre><code>struct ResponseBody: Decodable{
      var image: String
      var publishedDate: String
      var site: String
      var symbol: String
      var text: String
      var title: String
      var url: String
  }
  </code></pre>
  <p>or</p>
  <pre><code>[ {
    &quot;symbol&quot; : &quot;BAM&quot;,
    &quot;publishedDate&quot; : &quot;2022-02-20 20:02:00&quot;,
    &quot;title&quot; : &quot;Australia's AGL Energy rejects $3.5 billion offer, backs decision to split&quot;,
    &quot;image&quot; : &quot;https://cdn.snapi.dev/images/v1/m/0/m02d20220221t2i1591787921w940fhfwllplsqrlynxmpei1k013-1242500.jpg&quot;,
    &quot;site&quot; : &quot;Reuters&quot;,
    &quot;text&quot; : &quot;(Reuters) -Australian power producer AGL Energy Ltd on Monday rejected a $3.54 billion takeover offer from billionaire Mike Cannon-Brookes and Canada's Brookfield Asset Management in favour of its plan of splitting in two this year.&quot;,
    &quot;url&quot; : &quot;https://www.reuters.com/business/energy/agl-rejects-35-bln-bid-australias-second-richest-man-brookfield-2022-02-20/&quot;
  }, {
    &quot;symbol&quot; : &quot;UBER&quot;,
    &quot;publishedDate&quot; : &quot;2022-02-20 19:52:35&quot;,
    &quot;title&quot; : &quot;Uber In Portugal Is Now Offering Home Healthcare Visits&quot;,
    &quot;image&quot; : &quot;https://cdn.snapi.dev/images/v1/v/s/uber-in-portugal-is-now-offering-home-healthcare-visits-1242497.jpg&quot;,
    &quot;site&quot; : &quot;Forbes&quot;,
    &quot;text&quot; : &quot;Uber boldly continues to expand its presence in healthcare.&quot;,
    &quot;url&quot; : &quot;https://www.forbes.com/sites/saibala/2022/02/20/uber-in-portugal-is-now-offering-home-healthcare-visits/&quot;
  }, 
  etc.
  
  </code></pre>
  <p>I am very new to SwiftUI, and I have looked all over for answers but none have worked. My goal is to take the 5 most recent news stories and use the data above to make it fit into a struct I already made that looks like this:</p>
  <pre><code>struct SingularStory: View {
      var story: ResponseBody = previewNews
      
      var body: some View {
          VStack(alignment: .leading, spacing: 4) {
              HStack {
                  VStack {
                      
                      VStack(alignment: .leading, spacing: 8){
                          
                          
                          Text(story.site)
                          Text(story.title)
                              .bold()
                              .font(.subheadline)
                          
                          HStack {
                              Text(story.publishedDate)
                              Image(&quot;Rectangle 37&quot;)
                              Text(story.symbol)
                          }
                          
                      }
                      
                  }
                  Spacer()
                  
                  
                  
                  AsyncImage(url: URL(string: previewNews.image)) { image in
                      image
                          .resizable()
                          .scaledToFill()
                  } placeholder: {
                      ProgressView()
                  }
                  .frame(width: 64, height: 64)
                  .aspectRatio(contentMode: .fill)
                  .cornerRadius(6)
                  .padding(.trailing, 24)
                  
                  
              }
              .padding(.leading)
              
              Bar()
                  .padding(.vertical, 20)
          }
      }
  }
  </code></pre>
  <p>Any ideas for being able to fetch the data from the site, convert the JSON data into a form suitable for placement in SingularStory, and then presenting 5 of those stories would be greatly appreciated.</p>