I have an object defined with about 15 properties. I am trying to iterate over all of the properties that aren't equal to zero and are of type Int or Double. Something like this:
/*
object.price1 = 10.0
object.price2 = 9.9
object.price3 = 8.9
object.price4 = 10.1
object.name = "banana"
object.type = "fruit"
object.quantitySold = 0
object.dateIntroduced = ""
*/
let banana = object()
for property in banana {
object.property = property*2
}
Any ideas on how to accomplish this?