I tried to filter my class array but I keep getting an error and I have no idea why
this is my code :
var shops = [Shops]()
and the when I get data from server and save them
let desgin = subJson["desgin"].stringValue
let familiy_id = subJson["id"].stringValue
var info = Shops(shopname: shopName, Logo: logoString, family_id: familiy_id , design : desgin )
self.shops.append(info)
value of tuple string json has no member design
I'm trying to filter the shops with design.
Shops is where I save the data coming as JSON
class Shop {
...
var design: String?
...
}
design?Shops(shopname: shopName, Logo: logoString, family_id: familiy_id , design : desgin )here you are usingShopsbut your class name isShop