---
lang: en
title: 'API docs: filter.fields'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/filter
permalink: /doc/en/lb4/apidocs.filter.fields.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/filter](./filter.md) &gt; [Fields](./filter.fields.md)

## Fields type

Selection of fields

Example: `{afieldname: true}`

**Signature:**

```typescript
export type Fields<MT = AnyObject> = {
    [P in keyof MT]?: boolean;
} | Extract<keyof MT, string>[];
```

