I've a collection with contacts with a structure like:
name: 'XPTO Company',
emails: {
susan@xpto.com: { name: 'Susan', text: 'manager' },
fred@xpto.com: { name: 'Fred', text: 'marketing' }
}
How do I retrieve documents with email 'susan@xpto.com'
Something like:
firebase.firestore().collection('contacts')
.where(new firebase.firestore.FieldPath('emails', email), '==', true).get()
.then(snap => {
})