Open this example in the interactive library
Source code
import { URLSearchParams } from "node:url";
console.log(new URLSearchParams("tag=a&tag=b").getAll("tag"));
Sample output
[ 'a', 'b' ]

Open this example in the interactive library
import { URLSearchParams } from "node:url";
console.log(new URLSearchParams("tag=a&tag=b").getAll("tag"));
[ 'a', 'b' ]