Open this example in the interactive library
Source code
import { URLSearchParams } from "node:url";
console.log([...new URLSearchParams("city=New+York&zip=10001")]);
Sample output
[ [ 'city', 'New York' ], [ 'zip', '10001' ] ]

Open this example in the interactive library
import { URLSearchParams } from "node:url";
console.log([...new URLSearchParams("city=New+York&zip=10001")]);
[ [ 'city', 'New York' ], [ 'zip', '10001' ] ]