0

i want to ask something. why when im trying to get the reference firestore data, the value was print out like this. and i dont understand what this values mean, and how to use this.

{
  _key: { path: { len: 2, offset: 0, segments: [Array] } },
  converter: null,
  firestore: { app: [FirebaseAppImpl], databaseId: [ie], settings: [Yc] },
  type: "document",
}

how to get the reference data and return the proper data from firestore ?

this is what my references looks like:

this is what my references looks like

RubenSmn
  • 4,091
  • 2
  • 5
  • 24
Kirito
  • 1

1 Answers1

0

When you get the value of a reference field, you get back a DocumentReference object. If you just want to get its path, like is shown in your console screenshot, you can read the path property of the DocumentReference.


If you want to get the data from the referenced document (so from the warehouse), you can call get() on the DocumentReference, same as you'd do for a DocumentReference that you'd have constructed in another way. For more examples of that, see the documentation on getting a document.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807