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