Edit this page

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

This feature is experimental. Please share your experiences so we know what to keep or change.

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