Reputation: 81
I want to Update sub collection all documents. example: Sensor/userId/Data I want to update all members. Is it possible?
Upvotes: 2
Views: 8209
Reputation: 164
Your question leaves a lot to interpretation, but in JavaScript you can set (or update) a subcollection this way...
firestore.collection(`Sensor`).doc(userid).collection('members').doc(memberId).set(data)
See more here - https://firebase.google.com/docs/firestore/data-model
Upvotes: 6