---
lang: en
title: 'API docs: repository.filterbuilder.fields'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/repository
permalink: /doc/en/lb4/apidocs.repository.filterbuilder.fields.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [FilterBuilder](./repository.filterbuilder.md) &gt; [fields](./repository.filterbuilder.fields.md)

## FilterBuilder.fields() method

Describe what fields to be included/excluded

<b>Signature:</b>

```typescript
fields(...f: (Fields<MT> | (keyof MT)[] | keyof MT)[]): this;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  f | <code>(Fields&lt;MT&gt; &#124; (keyof MT)[] &#124; keyof MT)[]</code> | A field name to be included, an array of field names to be included, or an Fields object for the inclusion/exclusion |

<b>Returns:</b>

`this`


