I was wondering if anyone had any ideas on how to query multiple strings from an array at once in 'Firebase'. Basically query like you would using an AND condition. I have looked into restructuring my data in a hundred different ways but nothing has worked for me. Also, I have too much data to dump all the data and then match to my array after the query is performed. Any help or suggestions are greatly appreciated.
var uniqueStoreId = [“1”, “2”, “3”, “4”, “5”, “6”]
var posts = [Post]()
ref.queryOrderedByChild("storeId").queryEqualToValue("\(uniqueStoreId)").observeEventType(.Value, withBlock: {snapshot in
if let snapshot = snapshot.children.allObjects as? [FIRDataSnapshot] {
for snap in snapshot{
if let postDict = snap.value as? Dictionary<String, AnyObject> {
let key = snap.key
let post = Post(postKey: key, postData: postDict)
self.posts.insert(post, atIndex: 0)
}
}
}
})