import Foundation enum VideoDetails: String, CaseIterable{ case Nature , Food , Animals , Travel } struct ResponseBody: Decodable { var page: Int var perPage: Int var totalResults: Int var url: String var videos: [Video] } struct Video: Identifiable, Decodable{ var id: Int var image: String var duration: Int var user: User var videofiles: [VideoFile] struct User: Identifiable, Decodable { var id: Int var name: String var url: String } struct VideoFile: Identifiable, Decodable { var id: Int var quality: String var fileType: String var link: String } } //this one doesn't work but the below code works perfectly can anyone why it is happening import Foundation enum VideoDetails: String, CaseIterable{ case Nature , Food , Animals , Travel } struct Video: Identifiable, Decodable { var id: Int var image: String var duration: Int var user: User var videoFiles: [VideoFile] struct User: Identifiable, Decodable { var id: Int var name: String var url: String } struct VideoFile: Identifiable, Decodable { var id:
3
0
618