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

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

[Home](./index.md) &gt; [@loopback/sequelize](./sequelize.md) &gt; [SequelizeCrudRepository](./sequelize.sequelizecrudrepository.md) &gt; [buildSequelizeAttributeFilter](./sequelize.sequelizecrudrepository.buildsequelizeattributefilter.md)

## SequelizeCrudRepository.buildSequelizeAttributeFilter() method

Get Sequelize `attributes` filter value from `fields` of loopback.

**Signature:**

```typescript
protected buildSequelizeAttributeFilter(fields?: Fields): FindAttributeOptions | undefined;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

fields


</td><td>

[Fields](./filter.fields.md)


</td><td>

_(Optional)_ Loopback styles `fields` options. eg. `["name", "age"]`<!-- -->, `{ id: false }`


</td></tr>
</tbody></table>
**Returns:**

FindAttributeOptions \| undefined

Sequelize Compatible Object/Array based on the fields provided. eg. `{ "exclude": ["id"] }`


