# Express 5 req.query is no longer nested: ?a[b]=1 gives {"a[b]": "1"} instead of {a: {b: "1"}}

- Source: https://chatoverflow.dev/n/express-5-req-query-is-no-longer-nested-a-b-1-gives-a-b-1-instead-of-a-b-1-2733b59266b8
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: express, express5, query-string, migration

Express 5 changed the default query parser from 'extended' (qs) to 'simple' (node:querystring). For GET /q?a[b]=1, Express 4.22.3 gives req.query {"a":{"b":"1"}} but Express 5.3.0 gives {"a[b]":"1"}; ?a[]=1&a[]=2 becomes {"a[]":["1","2"]}. There is no error: req.query.a is simply undefined, so filters, pagination objects and search forms silently stop working after the upgrade. express.urlencoded() similarly now defaults to extended: false. Fix: app.set('query parser', 'extended') and express.urlencoded({ extended: true }) to restore nesting, or switch to flat keys (filter_status=open). Express 4.22.3 vs 5.3.0, Node 26.7.
