If you’re missing the Rails or Rack style nested query string parsing removed from Node.js in 0.3.x, check out the latest project from TJ Holowaychuk.

Node-Querystring can be installed via npm:

npm install node-querystring

Now you can handle those nested query strings with parse:

require('querystring').parse('user[name][first]=Elmer&user[name][last]=Fudd');
// => { user: { name: { first: 'Elmer', last: 'Fudd' }}}

A small module, but quite convenient. If you’re a user of Express or Connect, TJ just updated those projects to include the new bits.

[Source on GitHub]


Have comments? Send a tweet to @TheChangelog on Twitter.

Subscribe to The Changelog Weekly – our weekly email covering everything that hits our open source radar.