tencent cloud

Tencent Cloud Observability Platform

URLSearchParams.getAll

PDF
Focus Mode
Font Size
Last updated: 2025-03-11 20:21:25
URLSearchParams.getAll is used to get all values for the specified search parameter.
getAll(key: string): string[]

Parameters

Parameter
Type
Description
key
string
Key.

Return

Type
Description
string[]
All values for the specified search parameter.

Samples

Get all values for the specified search parameter:
import url from 'pts/url';

export default function() {
const params = new url.URLSearchParams('key1=value1&key2=value2');

params.append('key1', 1);
console.log(params.getAll('key1')); // value1,1
}


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback