I can't find the answer to this in the documentation. I have created a firebase cloud function which listens to the database and gets triggered when a doc in the database changes.
What I want the function to do is to gather information from the database, other than the information listened to in the first place, and then work with that information. How would I gather information from the Firestore database using firebase admin?
Down below is the code I have written so far:
exports.costCalculation = functions.firestore
.document("questions/{docId}/post_publish_information/outcome_information")
.onUpdate((change, context) => {
const predictions = admin
.firestore()
.document("questions/{docId}/post_publish_information/predictions");
console.log(predictions);
});