[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Object](https://evolu.dev/docs/api-reference/common/Object) › filterObjectKeys

```ts
function filterObjectKeys<T>(
  source: T,
  predicate: (key: string) => boolean,
): Readonly<Partial<Pick<T, Exclude<keyof T, symbol>>>>;
```

Defined in: [packages/common/src/Object.ts:277](https://github.com/evoluhq/evolu/blob/dd96d79f1dbe9a49fa12ce8e0aa7d3d0177795ca/packages/common/src/Object.ts#L277)

Selects own string-keyed properties while preserving their descriptors.

Visits enumerable and non-enumerable properties, ignoring inherited and
symbol properties. The predicate receives only the key; property values and
getters are never read. The result is a new ordinary object with matching
descriptors, including accessor functions and property flags. Declared
properties are optional because the predicate may exclude any of them.
Numeric property names are visited as strings.

### Example

```ts

const source = { APP_PORT: "4000", HOME: "/home/evolu" };
const selected = filterObjectKeys(source, (key) => key.startsWith("APP_"));

assertEqual(selected, { APP_PORT: "4000" });
assertType<
  typeof selected,
  { readonly APP_PORT?: string; readonly HOME?: string }
>();
```