ios - Firebase ios 从数据库中选择值等于某物的数据库

标签 ios swift firebase firebase-realtime-database

我有一个 firebase 数据库,想从数据库中快速获取值,但我需要过滤数据,因为我有两种类型的数据 IncExp我如何为 Firebase 创建一个查询,该查询将选择 Type = Exp 例如

的所有字段

这是我的数据库的样子

enter image description here

最佳答案

如果你从 firebase 得到你的响应作为一个数组,你可以做

response = response.filter({yourItem.type == "Exp"})

关于ios - Firebase ios 从数据库中选择值等于某物的数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47422109/

相关文章:

c# - Unity 中的 Firebase - 禁用持久性

ios - 使用不同的查询在帖子中获取 Firebase 用户信息

ios - Xamarin 无法在 iPhone 模拟器上运行 iOS 应用程序 - 不支持 386 架构

ios - dispatch_async 中的同步块(synchronized block)

ios - 查询子数组中的对象

ios - 动画不能快速工作

ios - 在类函数中使用异步调用/完成处理程序时,更新 Controller 中变量的最佳方法是什么?

ios - 调整放置在 UITableView 的页眉中的 UIImage 大小

ios - 将NSMutableArray对象加载到Labels的IBCollection中

Swift:iOS:从容器 View 内部调用 segue