---
lang: en
title: 'API docs: repository.keyvaluerepository.keys'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/repository
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 | [KeyValueFilter](./repository.keyvaluefilter.md) | Filter for keys |
|  options | [Options](./repository.options.md) | Options for the operation |

<b>Returns:</b>

AsyncIterable&lt;string&gt;

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


