Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Getting Search Parameters From A URL As An Array

const url = new URL('https://example.com/?firstkey=firstvalue&secondkey=secondvalue');
let searchParams = Array.from(url.searchParams.entries());
console.log(searchParams);
 
PREVIOUS NEXT
Tagged: #Getting #Search #Parameters #From #A #URL #As #An #Array
ADD COMMENT
Topic
Name
1+4 =