Edit this page

up.Params up.Params.prototype.toArray()
Class method

This feature is experimental. It may be changed or removed in a future version.

Returns an array representation of this up.Params instance.

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

Example

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

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

Return value

Array