---
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

|  Parameter | Type | Description |
|  --- | --- | --- |
|  fields | [Fields](./filter.fields.md) | _(Optional)_ Loopback styles <code>fields</code> options. eg. <code>[&quot;name&quot;, &quot;age&quot;]</code>, <code>{ id: false }</code> |

**Returns:**

FindAttributeOptions \| undefined

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


