【发布时间】:2018-01-01 17:14:21
【问题描述】:
我有一份文件。它在“产品”中有一堆对象字段 如何循环浏览这本字典?
let dict = doc.data()
for (key,value) in dict["products"]{
}
这给了我错误:
输入“任何?”不符合协议'Sequence'
我的明显问题是什么?
编辑:文档说
/**
* Retrieves all fields in the document as an `NSDictionary`.
*
* @return An `NSDictionary` containing all fields in the document.
*/
- (NSDictionary<NSString *, id> *)data;
【问题讨论】:
-
你能和我们分享一下
doc.data()实际上返回了什么吗?
标签: swift google-cloud-firestore