up.Params.prototype.toArray()

Instance 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 { name } and { value } properties.

Example

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

Type: Array