0

I have this structure:

[Collection] users
     [Document] id
            [Object] profile
                 [Field] photo: String
                 [Field] name: string
            [Object] user
                 [Field] lastname: String
                 [Field] name: string

Edit: Database structure image

Now i just wanna get the 'photo' field. How?

regex
  • 263
  • 4
  • 11
  • 1
    Is your question asking how to get a single field instead of complete document ? or get documents where that photo field is equal to something. – Dharmaraj Aug 29 '21 at 10:54
  • Please edit your question and add your database structure as a screenshot and indicate the exact data you want to get. Please respond with @AlexMamo – Alex Mamo Aug 29 '21 at 11:09
  • When you fetch a document in that collection, the `photo` field is included. What are you doing that's not working? – JayCodist Aug 29 '21 at 11:13
  • @Dharmaraj I just want to get a single field – regex Aug 29 '21 at 11:29
  • @JayCodist That its working, but i dont need the whole document, i just need one field – regex Aug 29 '21 at 11:30
  • 2
    You can't fetch just a field. You fetch the document, which will be an object containing the field – JayCodist Aug 29 '21 at 11:58

0 Answers0