parseQueryString
parseQueryString(
flat):Record<string,unknown>
Defined in: parse-query-string.ts:18
Parse flat query-string keys with bracket notation into the nested object shape
Express produces via qs, so every HTTP transport yields identical params.query:
{ “age[$gt]”: “21” } → { age: { $gt: “21” } } { “$or[0][role]”: “admin” } → { $or: [{ role: “admin” }] } { “tags[]”: [“a”, “b”] } → { tags: [“a”, “b”] } { tags: [“a”, “b”] } (repeated key) → { tags: [“a”, “b”] }
Values stay strings — type coercion is a schema concern, not a transport concern.
Keys nested deeper than MAX_DEPTH throw BadRequest.
Parameters
Section titled “Parameters”Record<string, string | string[]>
Returns
Section titled “Returns”Record<string, unknown>