【发布时间】:2018-08-11 19:46:59
【问题描述】:
如何从 firestore 数据库返回文档集合。 例如,我在 cloud firestore 中有一个名为 countries 的集合,我想将所有国家/地区名称和 id 获取为 json ,就像这样
[
{
"countryId" : 1,
"countryName" : "Any"
},
{
"countryId" : 2,
"countryName" : "India"
}
]
现在我正在对快照进行 foreach。这是将集合转换为 json 的唯一方法吗?
【问题讨论】:
标签: firebase google-cloud-firestore