我有一个联系人集合,其结构如下:
name: 'XPTO'
emails: { [email protected]: 'Susan', [email protected]: 'Fred' }
但查询不会返回结果:db.firestore().collection('contacts').where('[email protected]', '==', 'Susan').get().then(...
因为点位于“[电子邮件受保护]"
如何逃脱点?
我试过了``
and [ ]
并没有奏效。
建议您应该使用反引号转义字段的文档实际上是不正确的。它正在修复中。相反,你应该使用字段路径构建要查询的字段的路径:
db.firestore()
.collection('contacts')
.where(new FieldPath('emails', '[email protected]'), '==', 'Susan').
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)