---
lang: en
title: 'API docs: repository.keyvaluerepository.keys'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.repository.keyvaluerepository.keys.html
---

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

[Home](./index.md) &gt; [@loopback/repository](./repository.md) &gt; [KeyValueRepository](./repository.keyvaluerepository.md) &gt; [keys](./repository.keyvaluerepository.keys.md)

## KeyValueRepository.keys() method

Get an Iterator for matching keys

<b>Signature:</b>

```typescript
keys?(filter?: KeyValueFilter, options?: Options): AsyncIterable<string>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  filter | <code>KeyValueFilter</code> | Filter for keys |
|  options | <code>Options</code> | Options for the operation |

<b>Returns:</b>

`AsyncIterable<string>`

An async iteratable iterator of keys so that the return value can be used with `for-await-of`<!-- -->.


