[ad_1]
func getShopData(idx: Int, categoryIdx: String) -> DestiSearchResponseData {
var filterShopData = DestiSearchResponseData(space: "", imgUrl: "", handle: "", title: "", idx: 0, class: "", content material: "")
if destiSearchResponse[idx].class == categoryIdx{
filterShopData = destiSearchResponse[idx]
print("destiSearchResponse[idx]", destiSearchResponse[idx])
}
return filterShopData
}
// name technique
let shopData = destiSearchViewModel.getShopData(idx: indexPath.row, categoryIdx: “1”)
I need to discard the initially empty values in ‘shopData’ and use solely non-empty values.
What logic ought to I write?
An error happens as a result of the empty worth that was repeatedly initialized is handed.
[ad_2]
