I have a web app that gets data from Firestore v9. My instance of Firestore has a field of data type "reference".
When I query and get the reference object, I get the below when I console.log the result.
const ref = collection(firestoreDb, "users", "a_user", "subscriptions")
const firebaseResponse = await getDocs(ref)
firebaseResponse.forEach(doc => {
console.log(doc.data())
})
The output doesn't have the string which I could then use to place into another collection
or doc
function.
The field I'm using refers to this object:
I expect the output to include price and product_name.
I found some similar questions but there not exactly what I was looking for: