---
name: "up.Params.prototype.toArray"
area: "API"
kind: "Instance method"
parent: "up.Params class"
visibility: "experimental"
url: "https://unpoly.com/api/up.Params.prototype.toArray"
---
<nav aria-label="Unpoly docs">[All docs](https://unpoly.com/index.md) · [up.Params class](https://unpoly.com/api/up.Params.md)</nav>

# up.Params.prototype.toArray()

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

Returns an array representation of this [`up.Params`](https://unpoly.com/api/up.Params.md) instance.

The returned value is a JavaScript array with elements that are objects with `{ name }` and `{ value }` properties.

## Example {#example}

```js
let params = new up.Params('foo=bar&baz=bam')
let array = params.toArray()

// array is now: [
//   { name: 'foo', value: 'bar' },
//   { name: 'baz', value: 'bam' }
// ]
```

---

## Return value {#return-value}

Type: [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)

