Skip to content
This repository has been archived by the owner on Oct 23, 2021. It is now read-only.

sp core library.urlqueryparametercollection.getvalues

John Nguyen edited this page Apr 22, 2021 · 2 revisions

Home > @microsoft/sp-core-library > UrlQueryParameterCollection > getValues

UrlQueryParameterCollection.getValues() method

Returns the values of all of the matching query parameters or undefined if the key doesn't exist.

Signature:

getValues(param: string): (string | undefined)[] | undefined;

Parameters

Parameter Type Description
param string the case insensitive key for the desired query parameter value.

Returns:

(string | undefined)[] | undefined

Remarks

Examples:

this._queryParameterList = [
{key: TEST, value: done},
{key: DEBUG, value: false},
{key: TEST, value: notdone}]
  getValues('TEST') ---> ['done', 'notdone']
  getValues('debug')  ---> ['false']
  getValues('lost')  ---> undefined

Clone this wiki locally