I have an array of names, and a column which is of type string, and I am trying to get the information. When I use a for loop for each value in the where key, I get A LOT of the same info, so say there are 5 names, and I am trying to pick up rate (an Integer) I will get like 100 values instead of just 5.
var name = ["Dog", "Cat", "Monkey"]
let query = PFQuery(className: "Animals")
query.whereKey(not sure what to put since it is an array)
query.findObjectsInBackgroundWithBlock { (objects: [PFObject]?, error: NSError?) in
if(error == nil){
for object in objects!{
if let rating = object["rate"] as? Int{
self.rater.append(rating)
print("rating \(self.rater)") //There are like 75-100 values
}
}
}else{
print(error)
}
}