Lists the fields to return in a query's results.
The fields()
function returns only the specified fields in the query's results.
You can use include()
in conjunction with fields()
to get referenced items.
When fields()
receives an empty or invalid property, the query behaves as follows:
_id
field is returned.
Properties to return. To return multiple properties, pass properties as additional arguments.