I have collection called books
. It's structured like this
{
title: 'Book',
text: 'Large amount of text',
uid: 123
}
On some pages I need only title
field and don't need text
(that sometimes can be near 10mb
in size). How to fetch only those fields that I need ?
As I found from firebase docs I can only get all documents. But nothing about fields.
await db
.collection('books')
.where('uid', '==', uid)
.get();