---
name: "up.util.pickBy"
area: "API"
kind: "JavaScript function"
parent: "up.util module"
visibility: "experimental"
url: "https://unpoly.com/api/up.util.pickBy"
---
<nav aria-label="Unpoly docs">[All docs](https://unpoly.com/index.md) · [up.util module](https://unpoly.com/api/up.util.md)</nav>

# up.util.pickBy(object, tester)

**This feature is experimental**. Please [share](https://github.com/unpoly/unpoly/discussions) your experiences so we know what to keep or change.

Returns a copy of the given object that only contains properties that pass the given tester function.

---

## Parameters {#parameters}

### object {#object}

(required)

Type: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects)

### tester {#tester}

(required)

A function that will be called with each property.

The arguments are the property value and key.

Type: Function(value, key): boolean

---

## Return value {#return-value}

Type: [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects)

